Examples of EditableOMGraphic


Examples of com.bbn.openmap.omGraphics.EditableOMGraphic

            if (DEBUG)
                Debug.output("OMDrawingTool.create(): NOT showing GUI per request");
            unsetMask(SHOW_GUI_BEHAVIOR_MASK);
        }

        EditableOMGraphic eomg = getEditableGraphic(classname, ga);

        if (eomg == null || eomg.getGraphic() == null) {
            return null;
        }

        setAttributes(ga);
        eomg.setShowGUI(isMask(SHOW_GUI_BEHAVIOR_MASK));
        eomg.setActionMask(OMGraphic.ADD_GRAPHIC_MASK);

        return edit(eomg, requestor);
    }
View Full Code Here

Examples of com.bbn.openmap.omGraphics.EditableOMGraphic

            if (DEBUG)
                Debug.output("OMDrawingTool.edit(): NOT showing GUI per request");
            unsetMask(SHOW_GUI_BEHAVIOR_MASK);
        }

        EditableOMGraphic eomg = getEditableGraphic(g);

        if (eomg != null) {
            eomg.setShowGUI(isMask(SHOW_GUI_BEHAVIOR_MASK));
            eomg.setActionMask(OMGraphic.UPDATE_GRAPHIC_MASK);
            return edit(eomg, requestor);
        }

        return null;
    }
View Full Code Here

Examples of com.bbn.openmap.omGraphics.EditableOMGraphic

                          MouseEvent e) {

        OMGraphic ret = null;

        if (getCurrentEditable() == null) {
            EditableOMGraphic eomg = getEditableGraphic(g);
            if (eomg != null) {
                ret = edit(eomg, requestor, e);
            }
        }
View Full Code Here

Examples of com.bbn.openmap.omGraphics.EditableOMGraphic

     * Returns true of the OMGraphic is being edited, or is on an
     * EditableOMGraphicList being manipulated.
     */
    public boolean isEditing(OMGraphic omg) {
        boolean ret = false;
        EditableOMGraphic eomg = getCurrentEditable();
        if (eomg != null
                && eomg.getGraphic() == omg
                || (eomg instanceof EditableOMGraphicList && ((OMGraphicList) ((EditableOMGraphicList) eomg).getGraphic()).contains(omg))) {
            ret = true;
        }
        return ret;
    }
View Full Code Here

Examples of com.bbn.openmap.omGraphics.EditableOMGraphic

                requestor = rl;
                // now reactivate with the eomgl
                setCurrentEditable(eomgl);

                if (DEBUG) {
                    EditableOMGraphic ce = getCurrentEditable();
                    Debug.output("OMDrawingTool: current editable is: "
                            + (ce == null ? "null" : ce.getClass().getName()));
                }
                // Activate the list to make sure the listeners are
                // set up
                // so the map gets repainted with the new EOMG in
                // selected mode
View Full Code Here

Examples of com.bbn.openmap.omGraphics.EditableOMGraphic

     *         what to make.
     */
    public EditableOMGraphic getEditableGraphic(String classname,
                                                GraphicAttributes ga) {

        EditableOMGraphic eomg = null;
        EditToolLoader loader = (EditToolLoader) loaders.get(classname);
        if (loader == null) {

            if (DEBUG) {
                Debug.output("OMDrawingTool.getEditableGraphic(" + classname
View Full Code Here

Examples of com.bbn.openmap.omGraphics.EditableOMGraphic

                    // with something with the creation of the
                    // EditableOMGraphic and its display with the
                    // GrabPoints.
                    generateOMGraphic(g);

                    EditableOMGraphic eomg = loader.getEditableGraphic(g);

                    if (DEBUG)
                        Debug.output("OMDrawingTool.getEditableGraphic("
                                + g.getClass().getName() + "): found one.");
View Full Code Here

Examples of com.bbn.openmap.omGraphics.EditableOMGraphic

            if (DEBUG) {
                Debug.output("OMDrawingTool.eomgChanged(): omdt being told to deactivate");
            }

            if (isMask(USE_POPUP_BEHAVIOR_MASK) && !getUseAsTool()) {
                EditableOMGraphic eomg = getCurrentEditable();
                if (eomg != null) {
                    java.awt.Shape shape = eomg.getGraphic().getShape();
                    Rectangle rect = shape.getBounds();

                    Vector vec = new Vector();
                    vec.add(new JSeparator());
View Full Code Here

Examples of com.bbn.openmap.omGraphics.EditableOMGraphic

            JMenuItem gui = new JMenuItem(i18n.get(OMDrawingTool.class,
                    "popupMenuChangeAppearance",
                    "Change Appearance"));
            gui.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent ae) {
                    EditableOMGraphic eomg = getCurrentEditable();
                    if (eomg != null) {
                        boolean previous = eomg.getShowGUI();
                        eomg.setShowGUI(true);
                        setVisible(true);
                        if (!getUseAsTool()) {
                            showInWindow();
                        }
                        eomg.setShowGUI(previous);
                        eomg.getStateMachine().setSelected();
                    }
                }
            });
            if (isMask(SHOW_GUI_BEHAVIOR_MASK | GUI_VIA_POPUP_BEHAVIOR_MASK)
                    && !getUseAsTool()) {
                pum.add(gui);
            } else {
                Debug.output("Not adding Change Appearance to popup: guiViaPopup("
                        + isMask(SHOW_GUI_BEHAVIOR_MASK)
                        + ") isTool("
                        + getUseAsTool() + ")");
            }
        }

        if ((g.getAttribute(OMGraphicConstants.REMOVABLE)) == null
                || ((Boolean) g.getAttribute(OMGraphicConstants.REMOVABLE)).booleanValue()) {

            JMenuItem delete = new JMenuItem(i18n.get(OMDrawingTool.class,
                    "popupMenuDelete",
                    "Delete"));
            delete.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent ae) {
                    OMAction action = new OMAction();
                    action.setMask(OMGraphic.DELETE_GRAPHIC_MASK);
                    EditableOMGraphic eomg = getCurrentEditable();
                    if (eomg != null) {
                        OMGraphic g = eomg.getGraphic();
                        if (g != null) {
                            notifyListener(g, action);
                        }
                    }
                    setCurrentEditable(null);
View Full Code Here

Examples of com.bbn.openmap.omGraphics.EditableOMGraphic

    /**
     * 
     */
    public void mousePressed(MouseEvent e) {
        Debug.message("drawingtooldetail", "DrawingTool.mousePressed");
        EditableOMGraphic graphic = getCurrentGraphic();
        if (graphic != null) {
            graphic.mousePressed(e);
        }
        fireMouseLocation(e);
    }
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.