Re: [OpenMap Users] Customizing editor toolbar?

From: Carsten . Madsen <com_at_navicon.dk>
Date: Mon, 09 Jan 2006 21:45:49 +0100

I tried that but I want the poly add/remove node icons to appear in the
toolbar. I have tweaked my Editable class to do:

public class EditableOMRoute extends EditableOMDistance {
    public JToolBar getPolyGUI() {
        return getPolyGUI(false, true, true);
   }
    ...
}

But if I run with showAttributes=false the getPolyGUI code is never called?

regards
/carsten


Don Dietrick wrote:

> Hi Carsten,
>
> You can set the .showAttributes property to false, and those controls
> won't be shown. The 'Distance Layer' in the openmap.properties file
> has that setting.
>
> Regards,
>
> Don
>
>
> On Jan 9, 2006, at 9:44 AM, Carsten . Madsen wrote:
>
>> Hi
>>
>> 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) {
>> super(layer);
>> drawingTool = new OMDrawingTool() {
>> public Component getGUI() {
>> if (!resetGUIWhenDeactivated)
>> return this;
>> removeAll();
>> Component eomgc = null;
>> graphicAttributes.setLineMenuAdditions(null);
>> if (currentEditable != null) {
>> // GUI specific to a particular EditableOMGraphic
>> type.
>> eomgc = currentEditable.getGUI(graphicAttributes);
>> if (eomgc != null) {
>> add(eomgc);
>> }
>> }
>> // do not show the graphicAttributes part of the GUI
>> // Basic, generic GUI if eomgc wasn't set.
>> // if (eomgc == null) {
>> // add(graphicAttributes.getGUI());
>> // }
>> revalidate();
>> return this;
>> }
>> };
>> drawingTool.setUseAsTool(true); // prevents popup menu use.
>> drawingTool.getMouseMode().setVisible(false);
>> ga = drawingTool.getAttributes();
>> ga.setRenderType(OMGraphic.RENDERTYPE_LATLON);
>> ga.setLineType(OMGraphic.LINETYPE_GREATCIRCLE);
>> layer.setDrawingTool(drawingTool);
>> System.out.println("RouteDrawingEditorTool created!");
>> }
>> }
>>
>> Any hints?
>>
>> regards
>> /carsten
>>
>> --
>> [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"]
>
>
>

--
[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 - 15:47:27 EST

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