|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--edu.umd.cs.jazz.event.ZFilteredEventHandler
|
+--edu.umd.cs.jazz.event.ZDragSequenceEventHandler
|
+--edu.umd.cs.jazz.event.ZoomEventHandler
ZoomEventhandler provides event handlers for basic zooming of a Jazz camera with the right button. The interaction is that the initial mouse press defines the zoom anchor point, and then moving the mouse to the right zooms with a speed proportional to the amount the mouse is moved to the right of the anchor point. Similarly, if the mouse is moved to the left, the the camera is zoomed out.
This event handler will properly pan within internal cameras if the clicked within an internal camera.
| Inner classes inherited from class edu.umd.cs.jazz.event.ZFilteredEventHandler |
ZFilteredEventHandler.ZFilteredEventDispatcher |
| Fields inherited from class edu.umd.cs.jazz.event.ZFilteredEventHandler |
fFilteredEventDispatcher, fMouseFilter |
| Constructor Summary | |
ZoomEventHandler(ZSceneGraphObject aFilteredMouseEventSource)
Constructs a new ZoomEventHandler. |
|
| Method Summary | |
protected void |
endDrag(ZMouseEvent e)
When the dragging action ends invoke stopZooming. |
protected java.awt.geom.AffineTransform |
generateNextViewTransform()
Return the next view transform for the current cameras zooming sequence. |
double |
getMaxMagnification()
Return the max magnification that the zooming action is bound by. |
double |
getMinMagnification()
Return the min magnification that the zooming action is bound by. |
ZMouseFilter |
getMouseFilter()
Return the current event filter. |
protected boolean |
isZooming()
Return if is zooming. |
protected void |
isZooming(boolean aBoolean)
Set if is zooming. |
void |
setMaxMagnification(double aMagnification)
Set the maximum magnification that the camera can be set to with this event handler. |
void |
setMinMagnification(double aMagnification)
Set the minimum magnification that the camera can be set to with this event handler. |
protected void |
startDrag(ZMouseEvent e)
When the dragging action starts invoke startZooming. |
protected void |
startZooming(ZMouseEvent e)
Start zooming around the given mouse point with the interaction camera. |
protected void |
stopZooming(ZMouseEvent e)
Stop animated zooming. |
protected void |
zoomOneStep()
Do one zooming step, sleep a short amount, and schedule the next zooming step. |
| Methods inherited from class edu.umd.cs.jazz.event.ZDragSequenceEventHandler |
drag, dragInScreenCoords, filteredMouseDragged, filteredMousePressed, filteredMouseReleased, getCurrentScreenDelta, getCurrentScreenPoint, getDragStartScreenPoint, getMinDragStartDistance, getMousePressedScreenPoint, getPreviousScreenPoint, isDragging, setIsDragging, setMinDragStartDistance, shouldStartDragInteraction |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ZoomEventHandler(ZSceneGraphObject aFilteredMouseEventSource)
aFilteredMouseEventSource - the source for filtered ZMouseEvents and ZMouseMotionEvents.
See the ZFilteredEventHandler class comment to customize this behavior.| Method Detail |
public ZMouseFilter getMouseFilter()
getMouseFilter in class ZFilteredEventHandlerpublic double getMinMagnification()
public void setMinMagnification(double aMagnification)
newMinMag - the new minimum magnificationpublic double getMaxMagnification()
public void setMaxMagnification(double aMagnification)
newMaxMag - the new maximum magnificationprotected void startDrag(ZMouseEvent e)
startZooming.startDrag in class ZDragSequenceEventHandlerthe - event starting the drag.protected void endDrag(ZMouseEvent e)
stopZooming.endDrag in class ZDragSequenceEventHandlerthe - event ending the drag.protected void startZooming(ZMouseEvent e)
the - event starting the zoom.protected void zoomOneStep()
protected void stopZooming(ZMouseEvent e)
the - event stopping the zoom.protected boolean isZooming()
protected void isZooming(boolean aBoolean)
protected java.awt.geom.AffineTransform generateNextViewTransform()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||