jfreerails.client.view
Class MapViewJComponentConcrete.MapViewJComponentMouseAdapter
java.lang.Object
javax.swing.event.MouseInputAdapter
jfreerails.client.view.MapViewJComponentConcrete.MapViewJComponentMouseAdapter
- All Implemented Interfaces:
- java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener, javax.swing.event.MouseInputListener
- Enclosing class:
- MapViewJComponentConcrete
private final class MapViewJComponentConcrete.MapViewJComponentMouseAdapter
- extends javax.swing.event.MouseInputAdapter
Implements a MouseListener for FreerailsCursor-movement (left mouse
button) and a MouseMotionListener for map-scrolling (right mouse button).
Possible enhancements: setCursor(blankCursor),
g.draw(cursorimage,lastMouseLocation.x,lastMouseLocation.y,null)
Field Summary |
private java.awt.Point |
lastMouseLocation
|
private java.awt.Point |
screenLocation
Screen location of the mouse cursor, when the second mouse button was
pressed. |
private java.awt.Point |
sigmadelta
A variable to sum up relative mouse movement. |
private java.awt.Point |
tiledelta
Where to scroll - Reflects granularity, scroll direction and
acceleration, respects bounds. |
Methods inherited from class javax.swing.event.MouseInputAdapter |
mouseClicked, mouseEntered, mouseExited, mouseMoved |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
screenLocation
private java.awt.Point screenLocation
- Screen location of the mouse cursor, when the second mouse button was
pressed.
lastMouseLocation
private java.awt.Point lastMouseLocation
sigmadelta
private java.awt.Point sigmadelta
- A variable to sum up relative mouse movement.
tiledelta
private java.awt.Point tiledelta
- Where to scroll - Reflects granularity, scroll direction and
acceleration, respects bounds.
MapViewJComponentConcrete.MapViewJComponentMouseAdapter
private MapViewJComponentConcrete.MapViewJComponentMouseAdapter()
mousePressed
public void mousePressed(java.awt.event.MouseEvent evt)
- Specified by:
mousePressed
in interface java.awt.event.MouseListener
- Overrides:
mousePressed
in class javax.swing.event.MouseInputAdapter
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent evt)
- Specified by:
mouseReleased
in interface java.awt.event.MouseListener
- Overrides:
mouseReleased
in class javax.swing.event.MouseInputAdapter
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent evt)
- Specified by:
mouseDragged
in interface java.awt.event.MouseMotionListener
- Overrides:
mouseDragged
in class javax.swing.event.MouseInputAdapter