Examples of OMText


Examples of com.bbn.openmap.omGraphics.OMText

        return getLabel().getData();
    }

    protected OMText getLabel() {
        if (label == null) {
            label = new OMText(-1, -1, "", OMText.JUSTIFY_LEFT);
        }
        return label;
    }
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMText

    }

    private OMText createLabel(String text, int x, int y, Paint color,
                               int justification) {
        Font default_font = new Font("TimesRoman", Font.PLAIN, 10);
        OMText label = new OMText(x, y, text, default_font, justification);

        label.setLinePaint(color);
        label.setSelectPaint(Color.white);
        return label;
    }
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMText

                bottom,
                plot_color_);

        OMLine temp_axis = createPlotLine(left, top, left, bottom, plot_color_);

        OMText year_min_label = createLabel(min_year_string + " ",
                left,
                bottom + 10);

        OMText year_max_label = createLabel(max_year_string + " ",
                right - 30,
                bottom + 10);

        OMText temp_min_label = createLabel(min_temp_ + " ",
                left,
                bottom,
                plot_color_,
                OMText.JUSTIFY_RIGHT);

        OMText temp_max_label = createLabel(max_temp_ + " ",
                left,
                top,
                plot_color_,
                OMText.JUSTIFY_RIGHT);

        OMText temp_axis_label = createLabel("Temp", left, frame_y
                + (frame_height_ / 2), plot_color_, OMText.JUSTIFY_RIGHT);
        OMText year_axis_label = createLabel("Year", frame_x
                + (frame_width_ / 2), bottom + 15);

        // The background that the plot is drawn on.
        OMRect background = new OMRect(frame_x, frame_y, frame_x + frame_width_, frame_y
                + frame_height_);
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMText

     */
    public void createText(CoverageTable c, TextTable texttable, List textvec,
                           float latitude, float longitude, String text,
                           String featureType) {

        OMText txt = createOMText(text, latitude, longitude);
        int id = ((Integer) textvec.get(0)).intValue();
        setAttributesForFeature(txt, c, featureType, id);
        //        getAttributesForFeature(featureType).setTo(txt);
        addText(txt);
    }
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMText

     */
    private void setLocationColor(BasicLocation bl, int t) {
        if (bl == null)
            return;
        Paint c = getLabPaint(t);
        OMText label = bl.getLabel();
        if (label != null) {
            if (LabTextColor != null)
                label.setLinePaint(LabTextColor);
            else
                label.setLinePaint(c);
            if (labFont != null)
                label.setFont(labFont);
        }
        bl.setLocationPaint(c);
        if (SelectLabColor != null)
            bl.setSelectPaint(SelectLabColor);
    }
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMText

     * Create the graphics.
     */
    protected OMGraphicList generateGraphics() {
        OMGraphicList omgraphics = new OMGraphicList();
        OMPoint circ;
        OMText text;

        int circle_r = 2;
        int circle_h = 5;

        for (int i = 0, j = 0; i < llData.length; i += 2, j++) {

            // grouping
            OMGraphicList group = new OMGraphicList(2);

            // XY-Circle at LatLonPoint
            circ = new OMPoint(llData[i], llData[i + 1], circle_r);
            circ.setOval(true);
            circ.setFillPaint(lineColor);
            group.add(circ);

            // Info
            text = new OMText(llData[i], llData[i + 1], 0, circle_h + 10, infoData[j], java.awt.Font.decode("SansSerif"), OMText.JUSTIFY_CENTER);
            text.setLinePaint(lineColor);
            group.add(text);

            group.setAppObject(new Integer(j));//remember index
            omgraphics.add(group);
        }
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMText

        pushback = false;
        int idx;
        OMPoly omp = null;
        OMLine oml = null;
        MIFPoint ompoint = null;
        OMText omtext = null;
        boolean ismultiple = false;

        OMGraphicList aList = new OMGraphicList();

        // a vector of omgraphics for regions that allows adding and
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMText

        }
        // Have to set the location, colortable, pixel indexes later
        else {
            image = new OMScalingRaster(0f, 0f, 0f, 0f, PIXEL_EDGE_SIZE, PIXEL_EDGE_SIZE, (byte[]) null, (Color[]) null, opaqueness);
        }
        information = new OMText(0f, 0f, 10, 20, "***", new java.awt.Font("Helvetica", java.awt.Font.PLAIN, 10), OMText.JUSTIFY_LEFT);
        information.setLinePaint(Color.yellow);
        information.setFillPaint(new Color(100, 100, 100, 200));
        rectangle = new OMRect(0f, 0f, 0f, 0f, OMGraphic.LINETYPE_STRAIGHT);
        rectangle.setLinePaint(Color.yellow);
        rectangle.setLineType(OMGraphic.LINETYPE_STRAIGHT);
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMText

                    ypoints[i]), this);
            if (drawIntersections) {
                if (showLines) {
                    OMLine line = new YellowLine(xpoints[i - 1], ypoints[i - 1], xpoints[i], ypoints[i], width);
                    toDraw.add(line);
                    toDraw.add(new OMText((xpoints[i - 1] - xpoints[i]) / 2
                            + xpoints[i - 1], (ypoints[i - 1] - ypoints[i]) / 2
                            + ypoints[i - 1] - 5, "" + roadsMade, 0));
                } else {
                    OMPoint point = new YellowPoint(xpoints[i], ypoints[i], 10);
                    toDraw.add(point);
                }
            }
        }

        if (drawIntersections) {
            if (showLines) {
                OMLine line = new YellowLine(xpoints[nPoints - 2], ypoints[nPoints - 2], xpoints[nPoints - 1], ypoints[nPoints - 1], width);
                toDraw.add(line);
                toDraw.add(new OMText((xpoints[nPoints - 2] - xpoints[nPoints - 1])
                        / 2 + xpoints[nPoints - 2], (ypoints[nPoints - 2] - ypoints[nPoints - 1])
                        / 2 + ypoints[nPoints - 2] - 5, "" + roadsMade, 0));
                line.addArrowHead(true);
            } else {
                OMPoint point = new YellowPoint(xpoints[nPoints - 1], ypoints[nPoints - 1], 10);
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMText

    static class DTEDLocation {
        OMText text;
        OMRect dot;

        public DTEDLocation(int x, int y) {
            text = new OMText(x + 10, y, (String) null, (java.awt.Font) null, OMText.JUSTIFY_LEFT);

            dot = new OMRect(x - 1, y - 1, x + 1, y + 1);
            text.setLinePaint(java.awt.Color.red);
            dot.setLinePaint(java.awt.Color.red);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.