[OpenMap Users] Customizing editor toolbar?

From: Carsten . Madsen <com_at_navicon.dk>
Date: Mon, 09 Jan 2006 15:44:33 +0100


I'm trying to customize the editor tollbar for OMDistance's so that the
graphics attributes part, i.e., line width etc is not shown. I have
managed to get the GUI to work as I want it to but the modifications
breaks the editor functionallity, i.e., dragging a node only works until
the first time the distance label is updated. My code goes like this:

public class RouteDrawingEditorTool extends DrawingEditorTool {

    public RouteDrawingEditorTool(EditorLayer layer) {
        drawingTool = new OMDrawingTool() {
            public Component getGUI() {
                if (!resetGUIWhenDeactivated)
                    return this;
                Component eomgc = null;
                if (currentEditable != null) {
                    // GUI specific to a particular EditableOMGraphic type.
                    eomgc = currentEditable.getGUI(graphicAttributes);
                    if (eomgc != null) {
                // do not show the graphicAttributes part of the GUI
                // Basic, generic GUI if eomgc wasn't set.
// if (eomgc == null) {
// add(graphicAttributes.getGUI());
// }
                return this;
        drawingTool.setUseAsTool(true); // prevents popup menu use.
        ga = drawingTool.getAttributes();
        System.out.println("RouteDrawingEditorTool created!");

Any hints?


[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Mon Jan 09 2006 - 10:14:26 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:07 EDT