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: http://www.nabble.com/Adding-Buttons-to-GUI-tf2808583.html#a7838210
Sent from the OpenMap mailing list archive at Nabble.com.
--
[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 Tue Dec 12 2006 - 12:59:38 EST