edu.umd.cs.jazz.event
Class ZPanEventHandler
java.lang.Object
|
+--edu.umd.cs.jazz.event.ZEventHandler
|
+--edu.umd.cs.jazz.event.ZPanEventHandler
- public class ZPanEventHandler
- extends ZEventHandler
ZPanEventHandler provides event handlers for basic panning
of a Jazz camera with the left mouse. The interaction is that
clicking and dragging the mouse translates the camera so that
the point on the surface stays under the mouse.
|
Method Summary |
void |
mouseDragged(java.awt.event.MouseEvent e)
Mouse drag event handler |
void |
mousePressed(java.awt.event.MouseEvent e)
Mouse press event handler |
void |
mouseReleased(java.awt.event.MouseEvent e)
Mouse release event handler |
boolean |
moved()
Returns true if the most recent button press/drag/release resulted in a pan movement. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
minMovement
protected int minMovement
pressObjPt
protected java.awt.geom.Point2D pressObjPt
moved
protected boolean moved
pressScreenPt
protected java.awt.geom.Point2D pressScreenPt
ZPanEventHandler
public ZPanEventHandler(java.awt.Component c,
ZSurface v)
- Constructs a new ZPanEventHandler.
- Parameters:
c - The component that this event handler listens to events onv - The surface that is panned
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Mouse press event handler
- Parameters:
e - The event.- Overrides:
- mousePressed in class ZEventHandler
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- Mouse drag event handler
- Parameters:
e - The event.- Overrides:
- mouseDragged in class ZEventHandler
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Mouse release event handler
- Parameters:
e - The event.- Overrides:
- mouseReleased in class ZEventHandler
moved
public boolean moved()
- Returns true if the most recent button press/drag/release resulted in a pan movement.
- Returns:
- moved