Examples of OMGraphic


Examples of com.bbn.openmap.omGraphics.OMGraphic

     * @since
     */
    protected void filtre() {
        System.out.print("E00: filter type=" + filtreType + "  value="
                + filtreValeur);
        OMGraphic og;
        Object O;
        int count = 0;
        OMGraphicList g = arcs;
        int n = arcs.size();
        if ((filtreType == Integer.MIN_VALUE)
                && (filtreValeur == Integer.MIN_VALUE)) {
            for (int i = 0; i < n; i++)
                g.getOMGraphicAt(i).setVisible(true);
            count = n;
        } else
            for (int i = 0; i < n; i++) {
                og = g.getOMGraphicAt(i);
                O = og.getAppObject();
                if (O == null)
                    setVisible(false);
                else {
                    E00Data d = (E00Data) O;
                    boolean r = true;
                    if (filtreType != Integer.MIN_VALUE)
                        r &= (filtreType == d.type);
                    if (filtreValeur != Integer.MIN_VALUE)
                        r &= (filtreValeur == d.valeur);
                    og.setVisible(r);
                    if (r)
                        count++;
                }
            }

View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMGraphic

     *
     * @see com.bbn.openmap.omGraphics.EditableOMPoly#createGraphic(int,
     *      int)
     */
    public OMGraphic createGraphic(int renderType, int lineType) {
        OMGraphic g = null;
        switch (renderType) {
        case (OMGraphic.RENDERTYPE_LATLON):
            g = new LabeledOMSpline(new float[0], OMGraphic.RADIANS, lineType);
            break;
        case (OMGraphic.RENDERTYPE_OFFSET):
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMGraphic

        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

Examples of com.bbn.openmap.omGraphics.OMGraphic

            num_sites++;

            while (years.hasMoreElements()) {
                float year = ((Float) years.nextElement()).floatValue();
                float temp = site.getValueForYear(year);
                OMGraphic point = plotPoint(year, temp);

                plot_points_.addOMGraphic(point);

                if (!Float.isNaN(last_year)) {
                    // Connect all the rest with a line.
                    OMGraphic line = createGraphLine(last_year,
                            last_temp,
                            year,
                            temp);
                    plot_points_.addOMGraphic(line);
                }
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMGraphic

        //                         num_elements + " datapoints");

    }

    public OMGraphic selectPoint(int x, int y, float range) {
        OMGraphic selection;
        selection = plot_points_.selectClosest(x, y, range);
        return selection;
    }
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMGraphic

    /**
     * Return the OMGraphic object that is under a mouse event
     * occurrance on the map, null if nothing applies.
     */
    public OMGraphic getGeometryUnder(MouseEvent me) {
        OMGraphic omg = null;
        OMGraphicList list = null;
        if (layer != null) {
            list = layer.getList();
            if (list != null) {
                omg = list.findClosest(me.getX(), me.getY(), 4);
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMGraphic

        }
        setCurrentMouseEvent(e);
        boolean ret = false;

        GeometryOfInterest goi = getClickInterest();
        OMGraphic omg = getGeometryUnder(e);

        if (goi != null && !goi.appliesTo(omg, e)) {
            // If the click doesn't match the geometry or button
            // of the geometry of interest, need to tell the goi
            // that is was clicked off, and set goi to null.
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMGraphic

     * @return the consumeEvents setting of the mouse event concerns
     *         an OMGraphic, false if it didn't.
     */
    protected boolean updateMouseMoved(MouseEvent e) {
        boolean ret = false;
        OMGraphic omg = getGeometryUnder(e);
        GeometryOfInterest goi = getMovementInterest();

        if (omg != null && grp != null) {

            // This gets called if the goi is new or if the goi
            // refers to a different OMGraphic as previously noted.
            if (goi == null || !goi.appliesTo(omg)) {

                if (goi != null) {
                    mouseNotOver(goi.getGeometry());
                }

                goi = new GeometryOfInterest(omg, e);
                setMovementInterest(goi);
                setNoTimerOverOMGraphic(!omg.shouldRenderFill());
                ret = mouseOver(omg, e);
            }

        } else {
            if (goi != null) {
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMGraphic

    }

    private void showPlot() {
        show_plot_ = true;

        OMGraphic plot = generatePlot();
        OMGraphicList list = getList();

        if (plot != null) {
            //          System.out.println("Making plot visible..");
            list.addOMGraphic(plot);
View Full Code Here

Examples of com.bbn.openmap.omGraphics.OMGraphic

    private void hidePlot() {
        //      System.out.println("Making plot IN-visible..");
        show_plot_ = false;
        if (graph != null) {
            OMGraphic plot = graph.getPlotGraphics();
            OMGraphicList list = getList();

            if (list != null && plot != null) {
                list.remove(plot);
            }
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.