Re: [OpenMap Users] mouse modes

From: Maria Harmening <maria.harmening_at_greenfieldeng.com>
Date: Thu, 12 Jan 2006 11:26:48 -0500

hello,

thanks for the tips. i'm trying to write my own MouseMode class
because unfortunately having to double click in some instances and
single click in other instances is too confusing for the user. the
process has to be quick, efficient, and not confusing.

i need the right click navigation mode to work all of the time on all
layers. however, the left click gestures mode is only on those layers
that i choose to display tooltips and such. do you have any
suggestions on how i should write my own mouse mode? right now i'm
trying to make a class that implements MouseListener that detects
whether the left or right button was clicked. the listener is added to
the mapbean. once the detection is made, the method redirects the
event to the appropriate MapMouseMode method. This isn't working for
me.

thanks in advance,
maria

> Hi Maria,
>
> If you wish to just switch between mouse modes you have to:
> - extends GesturesMouseMode, detect right-click and call method
> MouseDelegator.setActiveMouseModeWithID(NavigationMouseMode.ID)
> - do similar thing with NavMouseMode: detect left-click and call
> MouseDelegator.
>
> It should work like this: first click changes mouse mode, subsequent
> clicks are interpreted by new mouse mode.
>
> If you wish to have both Gestures and Navigation functionality in one
> mouse mode (no switching), than you have to write your own MouseMode
> class (possibly extending one of standard mouse modes) and implement
> your logic. The problem is that standard layers respond to mouse
modes
> of specific IDs. You cannot assign two different IDs to one mouse
mode.
> So you have to change Layer.getMouseModeServiceList method in each
layer
> you are going to use with your new mouse mode.
>
> Hope this helps a little,
> Regards,
> Piotr Kaminski
>
> Maria Harmening napisaƂ(a):
> > hello, all,
> >
> > can anyone tell me if it's possible to set the MapMouseMode
> > to "Gestures" if the user left-clicks and "Navigation" if the user
> > right-clicks"?
> >
> > thanks,
> > maria
> >
> > --
> > [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"]
>
> --
> [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"]
>
>

-- 
NeoMail - http://neomail.sourceforge.net
--
[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 Thu Jan 12 2006 - 11:32:16 EST

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