Package com.bbn.openmap.tools.drawing

Examples of com.bbn.openmap.tools.drawing.DrawingTool.canEdit()


    /**
     * Query that an OMGraphic is selectable.
     */
    public boolean isSelectable(OMGraphic omg) {
        DrawingTool dt = getDrawingTool();
        return (dt != null && dt.canEdit(omg.getClass()));
    }

    /**
     * Query for what text should be placed over the information bar when the
     * mouse is over a particular OMGraphic.
View Full Code Here


     * Query for what text should be placed over the information bar when the
     * mouse is over a particular OMGraphic.
     */
    public String getInfoText(OMGraphic omg) {
        DrawingTool dt = getDrawingTool();
        if (dt != null && dt.canEdit(omg.getClass())) {
            return "Click to edit graphic.";
        } else {
            return null;
        }
    }
View Full Code Here

    public void select(OMGraphicList list) {
        if (list != null && list.size() > 0) {
            OMGraphic omg = list.getOMGraphicAt(0);
            DrawingTool dt = getDrawingTool();

            if (dt != null && dt.canEdit(omg.getClass())) {
                dt.setBehaviorMask(OMDrawingTool.QUICK_CHANGE_BEHAVIOR_MASK);
                if (dt.edit(omg, this) == null) {
                    // Shouldn't see this because we checked, but ...
                    fireRequestInfoLine("Can't figure out how to modify this object.");
                }
View Full Code Here

    /**
     * Query that an OMGraphic is selectable.
     */
    public boolean isSelectable(OMGraphic omg) {
        DrawingTool dt = getDrawingTool();
        return (shouldEdit(omg) && dt != null && dt.canEdit(omg.getClass()));
    }

    String editInstruction = i18n.get(DrawingToolLayer.class,
            "CLICK_TO_EDIT",
            "Click to edit.");
View Full Code Here

     * Query for what text should be placed over the information bar when the
     * mouse is over a particular OMGraphic.
     */
    public String getInfoText(OMGraphic omg) {
        DrawingTool dt = getDrawingTool();
        if (dt != null && dt.canEdit(omg.getClass())) {
            return editInstruction;
        } else {
            return null;
        }
    }
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.