|
||||||||||
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.bbox.SlippyMapControler
public class SlippyMapControler
This class controls the user input by listening to mouse and key events. Currently implemented is: - zooming in and out with scrollwheel - zooming in and centering by double clicking - selecting an area by clicking and dragging the mouse
Nested Class Summary | |
---|---|
private class |
SlippyMapControler.MoveTask
Moves the map depending on which cursor keys are pressed (or not) |
private class |
SlippyMapControler.MoveXAction
|
private class |
SlippyMapControler.MoveYAction
|
private class |
SlippyMapControler.ZoomInAction
|
private class |
SlippyMapControler.ZoomOutAction
|
Field Summary | |
---|---|
private static double |
ACCELERATION
The speed increase per timer interval when a cursor button is clicked |
private java.awt.Point |
iEndSelectionPoint
|
private SizeButton |
iSizeButton
|
private SlippyMapBBoxChooser |
iSlippyMapChooser
|
private SourceButton |
iSourceButton
|
private boolean |
isSelecting
|
private java.awt.Point |
iStartSelectionPoint
|
private static double |
MAX_SPEED
The maximum speed (pixels per timer interval) |
private SlippyMapControler.MoveTask |
moveTask
Does the moving |
private static java.util.Timer |
timer
A Timer for smoothly moving the map area |
private static long |
timerInterval
How often to do the moving (milliseconds) |
Constructor Summary | |
---|---|
SlippyMapControler(SlippyMapBBoxChooser navComp,
javax.swing.JPanel contentPane,
SizeButton sizeButton,
SourceButton sourceButton)
Create a new OsmMapControl |
Method Summary | |
---|---|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
Start drawing the selection rectangle if it was the 1st button (left button) |
void |
mouseReleased(java.awt.event.MouseEvent e)
When dragging the map change the cursor back to it's pre-move cursor. |
Methods inherited from class java.awt.event.MouseAdapter |
---|
mouseClicked, mouseEntered, mouseExited, mouseWheelMoved |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.awt.event.MouseListener |
---|
mouseClicked, mouseEntered, mouseExited |
Field Detail |
---|
private static final java.util.Timer timer
private SlippyMapControler.MoveTask moveTask
private static long timerInterval
private static final double MAX_SPEED
private static final double ACCELERATION
private java.awt.Point iStartSelectionPoint
private java.awt.Point iEndSelectionPoint
private final SlippyMapBBoxChooser iSlippyMapChooser
private SizeButton iSizeButton
private SourceButton iSourceButton
private boolean isSelecting
Constructor Detail |
---|
public SlippyMapControler(SlippyMapBBoxChooser navComp, javax.swing.JPanel contentPane, SizeButton sizeButton, SourceButton sourceButton)
Method Detail |
---|
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class java.awt.event.MouseAdapter
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in class java.awt.event.MouseAdapter
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
mouseReleased
in class java.awt.event.MouseAdapter
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
mouseMoved
in class java.awt.event.MouseAdapter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |