RE: [OpenMap Users] Adding Buttons to GUI

From: Bivens, Hugh P <>
Date: Tue, 12 Dec 2006 10:27:40 -0700

The way I did it (may not be the best way!) was to implement findAndInit
in my layer. It would check if a ToolPanel was added, and then add stuff
to it:
public void findAndInit(Object someObj)
        if (someObj instanceof ToolPanel)
            JButton button = new JButton("Foo");
            ((ToolPanel) someObj).add(button);
            // could also save a reference to the tool panel to add
stuff later.


From: []
On Behalf Of Gatrell, Mark (SELEX) (UK)
Sent: Tuesday, December 12, 2006 9:19 AM
Subject: [OpenMap Users] Adding Buttons to GUI

Hi all
I would like to add some OMToolComponent control buttons alongside the
existing buttons on the main map gui.
I have added them by modifying the properties file (openmap.components =
existing plus myNewButton..extended OMToolComponent).
I would like to programaticaly add these tool components from my
extended OMGraphicsHandlerLayer class , but do not know how to add them
to the tool bar once I have instatiated the class within my layer.
I would be gratefull if someone could explain how I do this.. I could
then change the icons etc on the fly using logic from my layer class..
thankyou in advance
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.


[To unsubscribe to this list send an email to ""
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Dec 12 2006 - 12:47:29 EST

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