Re: [OpenMap Users] Mouse Wheel Events

From: Roy Newton <newton_at_bmh.com>
Date: Wed, 25 Aug 2004 11:38:58 -0400

Here's the way I did it...


public class TacMapNavMode extends NavMouseMode implements
MouseWheelListener{

    ...

public void mouseWheelMoved(MouseWheelEvent e) {

float curLevel = TacMap.getInstance().getMainMapBean().getScale();

if(e.getWheelRotation() > 0){ //down

TacMap.getInstance().zoom(curLevel * 0.5f);

}

else{//up

TacMap.getInstance().zoom(curLevel / 0.5f);

}

}





}

----- Original Message -----
From: "Chris Allport" <chris.allport_at_red-inc.us>
To: <openmap-users_at_bbn.com>
Sent: Wednesday, August 25, 2004 10:31 AM
Subject: [OpenMap Users] Mouse Wheel Events


> I would like to capture mouse wheel events in one of my layers. I found
> that I cannot simply extend the MouseWheelListener in my layer -- it
blocks
> the other mouse events.
>
> Can anyone share how they have implemented capturing the mouse wheel?
>
> Thanks in advance-
>
> Chris
>
> --
> Chris Allport
> Unmanned Systems Research & Development Lab
> Patuxent River Naval Air Station
> Phone: (301) 904-5943
>
>
> --
> [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"]
Received on Wed Aug 25 2004 - 11:42:27 EDT

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