good suggestion. there are empty setActive(boolean) and
findAnInit(iterator) methods in AbstractMouseMode that my mouse mode
isn't taking advantage of.
I went ahead and let my menu listen for property changes from the mouse
delegator, and it all works fine. the menu is enabled only when my
particular mouse mode is active. but, it probably makes more sense to
have my mouse mode tell the menu to be enabled, rather than have the
menu ask if it can be enabled.
thanks
jeff
Donald Dietrick wrote:
>
> Hi Jeff,
>
> Your mouse mode is told when it is made active and inactive:
>
> MapMouseMode.setActive(boolean).
>
> You can have the MouseMode control whether the menu is enabled,
> depending on if it is active.
>
> Cheers,
>
> Don
>
> On Tuesday, August 21, 2001, at 01:42 PM, Jeff Mathis wrote:
>
> > hello,
> >
> > i thought I would just throw this out there while I'm trying to figure
> > this out myself.
> >
> > I have extended AbstractOpenMapMenu and created my own menu and have
> > added it to the tool bar. I have also created my own MouseMode to do
> > certain mouse-realted activities. What I want to do now is deactivate my
> > menu when my mouse mode is not active. Stated another way, when a user
> > has selected my mouse mode, they should also have the option of
> > accessing my menu options. when a different mouse mode has been
> > selected, my menu should not be accessible (not active).
> >
> > I'm thinking of having my menu implement a PropertyChangeListener
> > interface and have it listen for PropertyChangeEvents from the
> > MouseDelegator. When the correct event happens, it will ask the
> > delegator which mouse mode is active, and react accordingly.
> >
> > Is there a better/more graceful way of doing this?
> >
> > jeff
> > --
> > Jeffrey Mathis, PhD FAX: 505-988-2229
> > Senior Scientist email: jeff.mathis@biosgroup.com
> > Bios Group, Inc. phone 505-992-6737
> > 317 Paseo de Peralta http://www.biosgroup.com
> > Santa Fe, NM 87501
> >
> > --
> > [To unsubscribe to this list send an email to "majdart@bbn.com"
> > with the following text in the BODY of the message "unsubscribe
> > openmap-users"]
> >
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Donald F. Dietrick, dietrick@bbn.com
> BBN Technologies, 10 Moulton Street, Cambridge, MA 02138
> 617.873.3031 FAX 2794
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-- Jeffrey Mathis, PhD FAX: 505-988-2229 Senior Scientist email: jeff.mathis@biosgroup.com Bios Group, Inc. phone 505-992-6737 317 Paseo de Peralta http://www.biosgroup.com Santa Fe, NM 87501 -- [To unsubscribe to this list send an email to "majdart@bbn.com" with the following text in the BODY of the message "unsubscribe openmap-users"]Received on Tue Aug 21 16:09:43 2001
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:31 EDT