Package com.bbn.openmap.omGraphics

Examples of com.bbn.openmap.omGraphics.OMCircle


        name_ = "(" + latitude_ + ", " + longitude_ + ")";

        //      graphic_ = new OMCircle(lat, lon, 5,5, 11, 11,
        // default_bits_);
        graphic_ = new OMCircle(lat, lon, 5, 5);
        graphic_.setLinePaint(Color.red);
        graphic_.setFillPaint(Color.red);
        graphic_.setSelectPaint(Color.yellow);
        graphic_.setAppObject(this);
View Full Code Here


        String yearstring = GetStringDateFromFloat(year);

        String name = "Time: " + yearstring + ", Temperature: " + temp + "C ("
                + (int) ((9.0 / 5.0) * temp + 32) + "F)";

        OMGraphic graphic = new OMCircle(x, y, 2, 2);
        graphic.setLinePaint(plot_color_);
        graphic.setFillPaint(plot_color_);
        graphic.setSelectPaint(select_color_);
        graphic.setAppObject(name);

        return graphic;
    }
View Full Code Here

                    DrawingTool dt = getDrawingTool();
                    GraphicAttributes ga = new GraphicAttributes();
                    ga.setRenderType(OMGraphic.RENDERTYPE_LATLON);
                    ga.setLinePaint(Color.red);
                    if (dt != null) {
                        OMCircle circle = (OMCircle) getDrawingTool().create("com.bbn.openmap.omGraphics.OMCircle",
                                ga,
                                layer);
                        if (circle == null) {
                            Debug.error("AmpLinkLayer: Drawing tool can't create Exclusion Zones");
                        }
View Full Code Here

                        radphi,
                        radlambda);
                // convert into decimal degrees
                float rad = (float) ProjMath.radToDeg(dRad);
                // make the circle
                OMCircle circle = new OMCircle(pt1.getLatitude(), pt1.getLongitude(), rad);
                // get the map projection
                Projection proj = theMap.getProjection();
                // prepare the circle for rendering
                circle.generate(proj);
                // render the circle graphic
                circle.render(g);
            }
        } // end if(displayCircle)
    }
View Full Code Here

     */
    public static OMCircle read(DataInputStream dis,
                                LinkProperties propertiesBuffer)
            throws IOException {

        OMCircle circle = null;
        float lat, lon, radius;
        int x, y, w, h;

        int renderType = dis.readByte();

        switch (renderType) {
        case RENDERTYPE_LATLON:
            lat = dis.readFloat();
            lon = dis.readFloat();
            radius = dis.readFloat();
            int units = dis.readByte();
            int nverts = dis.readInt();

            Length unit = Length.DECIMAL_DEGREE;

            switch (units) {
            case 0:
                unit = Length.KM;
                break;
            case 1:
                unit = Length.MILE;
                break;
            case 2:
                unit = Length.NM;
                break;
            default:
            }

            circle = new OMCircle(new LatLonPoint(lat, lon), radius, unit, nverts);
            break;
        case RENDERTYPE_XY:
            x = dis.readInt();
            y = dis.readInt();
            w = dis.readInt();
            h = dis.readInt();

            circle = new OMCircle(x, y, w, h);
            break;
        case RENDERTYPE_OFFSET:
            lat = dis.readFloat();
            lon = dis.readFloat();
            x = dis.readInt();
            y = dis.readInt();
            w = dis.readInt();
            h = dis.readInt();

            circle = new OMCircle(lat, lon, x, y, w, h);
            break;
        default:
        }

        if (circle != null) {
View Full Code Here

        OMPoint point = new OMPoint(42f, -72f, 14);
        point.setFillPaint(Color.green);
        point.setOval(true);
        omList.add(point);

        OMCircle circle = new OMCircle(40f, -70f, 50, 200);
        circle.setRotationAngle(com.bbn.openmap.MoreMath.HALF_PI / 2f);
        circle.putAttribute(OMGraphicConstants.LABEL,
                new OMTextLabeler("Circle Label", OMText.JUSTIFY_CENTER));
        omList.add(circle);

        int[] llPointsx = new int[5];
        int[] llPointsy = new int[5];
View Full Code Here

                    "DayNightLayer:  Creating polygon terminator");
            LatLonPoint darkPoint = GreatCircle.spherical_between(brightPoint.radlat_,
                    brightPoint.radlon_,
                    (float) Math.PI,
                    (float) Math.PI / 4f);
            OMCircle circle = new OMCircle(darkPoint, (projection instanceof Cylindrical) ? 90f
                    : 89.0f,//HACK
                    Length.DECIMAL_DEGREE, terminatorVerts);
            circle.setPolarCorrection(true);
            circle.setFillPaint(nighttimeColor);
            circle.setLinePaint(nighttimeColor);
            circle.generate(projection);
            Debug.message("daynight",
                    "DayNightLayer: Done creating polygon terminator");
            return circle;
        }
View Full Code Here

        }

        // create OMCircle from internal circle representation
        switch (circle.rt) {
        case OMGraphic.RENDERTYPE_LATLON:
            omcircle = new OMCircle(circle.llpts[0], circle.llpts[1], circle.radius, Length.KM, circle.nsegs);
            omcircle.setPolarCorrection(true);
            break;
        case OMGraphic.RENDERTYPE_XY:
            omcircle = new OMCircle(circle.xypts[0], circle.xypts[1], circle.width, circle.height);
            break;
        case OMGraphic.RENDERTYPE_OFFSET:
            omcircle = new OMCircle(circle.llpts[0], circle.llpts[1], circle.xypts[0], circle.xypts[1], circle.width, circle.height);
            break;
        default:
            System.err.println("ARRRR!");
            break;
        }
View Full Code Here

TOP

Related Classes of com.bbn.openmap.omGraphics.OMCircle

Copyright © 2018 www.massapicom. 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.