Package org.openstreetmap.josm.gui.bbox
Class SlippyMapController.MoveTask
- java.lang.Object
-
- java.util.TimerTask
-
- org.openstreetmap.josm.gui.bbox.SlippyMapController.MoveTask
-
- All Implemented Interfaces:
Runnable
- Enclosing class:
- SlippyMapController
private class SlippyMapController.MoveTask extends TimerTask
Moves the map depending on which cursor keys are pressed (or not)
-
-
Field Summary
Fields Modifier and Type Field Description private int
directionX
The horizontal direction of movement, -1:left, 0:stop, 1:rightprivate int
directionY
The vertical direction of movement, -1:up, 0:stop, 1:downprotected boolean
scheduled
Indicated ifmoveTask
is currently enabled (periodically executed via timer) or disabledprivate double
speedX
The current x speed (pixels per timer interval)private double
speedY
The current y speed (pixels per timer interval)
-
Constructor Summary
Constructors Modifier Constructor Description private
MoveTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run()
protected void
setDirectionX(int directionX)
protected void
setDirectionY(int directionY)
private void
updateScheduleStatus()
-
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
-
-
-
Field Detail
-
speedX
private double speedX
The current x speed (pixels per timer interval)
-
speedY
private double speedY
The current y speed (pixels per timer interval)
-
directionX
private int directionX
The horizontal direction of movement, -1:left, 0:stop, 1:right
-
directionY
private int directionY
The vertical direction of movement, -1:up, 0:stop, 1:down
-
scheduled
protected boolean scheduled
Indicated ifmoveTask
is currently enabled (periodically executed via timer) or disabled
-
-
Constructor Detail
-
MoveTask
private MoveTask()
-
-
Method Detail
-
setDirectionX
protected void setDirectionX(int directionX)
-
setDirectionY
protected void setDirectionY(int directionY)
-
updateScheduleStatus
private void updateScheduleStatus()
-
-