Re: [OpenMap Users] Menu links

From: Don Dietrick <>
Date: Sun, 20 Mar 2005 00:58:53 -0500

Hi Mark,

On Mar 17, 2005, at 9:20 AM, Gatrell, Mark (UK) wrote:

> Hi all
> I would like to add a menu to the menu bar on the mapbean so that I
> can set dynamic properties for my extended OMGraphicLayer.
> Could some one tell me how I can add the menu from my layer and the
> best way of linking the properties from that menu to my layer.

The layer can create the menu, and look for the MenuBar in the
findAndInit method to add the menu to it. If you want more control
over where the menu is in the MenuBar, add an empty Menu that
implements a specific, unique interface to the openmap.components
property or to the menu bar's properties, so it gets located properly.
If you add the menu to the openmap.components property, your layer can
look for that object in it's findAndInit(...) method, and just add
MenuItems to it that make calls on the layer. If you add your menu to
the menu bar's properties, you might have to look for the MenuBar in
the findAndInit(...) method, and then search it for your menu.

> I was thinking of using an interface to link the data, but do not
> understand how to create the menu from my layer.
> I successfully added a menu from the properties file but I could not
> link to it.. Hence my request for help.

Oh, OK, So have your menu implement some madeup interface, say
MyMenuInterface. Then in your layer.findAndInit(object) method that
you can override, look for an object that is an instanceof

Hope this helps,


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 Sun Mar 20 2005 - 00:59:21 EST

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