Re: activating a toolbar menu

From: Donald Dietrick <dietrick@bbn.com>
Date: Tue Aug 21 2001 - 15:34:11 EDT

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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[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 15:32:58 2001

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:31 EDT