|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.event.MouseAdapter
org.openstreetmap.josm.gui.MapMover
public class MapMover
Enables moving of the map by holding down the right mouse button and drag the mouse. Also, enables zooming by the mouse wheel.
| Constructor Summary | |
|---|---|
MapMover(NavigatableComponent navComp,
javax.swing.JPanel contentPane)
Create a new MapMover |
|
| Method Summary | |
|---|---|
static boolean |
isPlatformOsx()
Replies true if we are currently running on OSX |
void |
mouseDragged(java.awt.event.MouseEvent e)
If the right (and only the right) mouse button is pressed, move the map |
void |
mouseMoved(java.awt.event.MouseEvent e)
Emulates dragging on Mac OSX |
void |
mousePressed(java.awt.event.MouseEvent e)
Start the movement, if it was the 3rd button (right button). |
void |
mouseReleased(java.awt.event.MouseEvent e)
Change the cursor back to it's pre-move cursor. |
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e)
Zoom the map by 1/5th of current zoom per wheel-delta. |
| Methods inherited from class java.awt.event.MouseAdapter |
|---|
mouseClicked, mouseEntered, mouseExited |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MapMover(NavigatableComponent navComp,
javax.swing.JPanel contentPane)
| Method Detail |
|---|
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenermouseDragged in class java.awt.event.MouseAdapterpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenermousePressed in class java.awt.event.MouseAdapterpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenermouseReleased in class java.awt.event.MouseAdapterpublic void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved in interface java.awt.event.MouseWheelListenermouseWheelMoved in class java.awt.event.MouseAdaptere - The wheel event.public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenermouseMoved in class java.awt.event.MouseAdapterpublic static boolean isPlatformOsx()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||