RE: [OpenMap Users] Adding Buttons to GUI

From: Gatrell, Mark \(SELEX\) \(UK\) <"Gatrell,>
Date: Wed, 13 Dec 2006 16:30:57 -0000


Hi all

Thankyou all for your answers to this..

I have implemented this now using the findandinit method.. I will
experiment with the other methods to see which one is best suited..

Thanks again all, your help is appreciated



-----Original Message-----
From: Don Dietrick []
Sent: 13 December 2006 15:58
To: Gatrell, Mark (SELEX) (UK); openmap-users questions
Subject: Re: [OpenMap Users] Adding Buttons to GUI

              *** WARNING ***

This mail has originated outside your organization, either from an
external partner or the Global Internet.
     Keep this in mind if you answer this message.

You can also have your layer implement the com.bbn.openmap.gui.Tool
interface, and if the ToolPanel is added to the application, the
ToolPanel will take care of it. The Tool.getFace() method would return
the components you want to add to the ToolPanel.

- Don

On Dec 12, 2006, at 12:58 PM, oland wrote:

> Find the ToolPanel in the bean context and then just add the
> OMToolComponents
> to the tool panel
> Here is how you find the frame OM is sitting in
> MapHandler mh = (MapHandler) getBeanContext();
> Frame frame = null;
> if (mh != null) {
> frame = (Frame) mh.get(java.awt.Frame.class);
> }
> You can find the ToolPanel in a simmilar way.
> regards
> /carsten
> Gatrell, Mark (SELEX) (UK) wrote:
>> 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
>> regards
>> Mark
>> ********************************************************************
>> 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.
>> ********************************************************************
> --
> View this message in context:
> to-GUI-tf2808583.html#a7838210
> Sent from the OpenMap mailing list archive at
> --
> [To unsubscribe to this list send an email to ""
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]

Don Dietrick,
BBN Technologies, Cambridge, MA

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

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