|
Jazz API Documentation | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--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.
| Constructor Summary | |
ZoomEventHandler(ZNode node)
Constructs a new ZoomEventHandler. |
|
| Method Summary | |
void |
mouseClicked(ZMouseEvent e)
Invoked when the mouse has been clicked on a component. |
void |
mouseDragged(ZMouseEvent e)
Mouse drag event handler |
void |
mouseEntered(ZMouseEvent e)
Invoked when the mouse enters a component. |
void |
mouseExited(ZMouseEvent e)
Invoked when the mouse exits a component. |
void |
mouseMoved(ZMouseEvent e)
Invoked when the mouse button has been moved on a node (with no buttons no down). |
void |
mousePressed(ZMouseEvent e)
Mouse press event handler |
void |
mouseReleased(ZMouseEvent e)
Mouse release event handler |
void |
setActive(boolean active)
Specifies whether this event handler is active or not. |
void |
setMaxMagnification(float newMaxMag)
Set the maximum magnification that the camera can be set to with this event handler. |
void |
setMinMagnification(float newMinMag)
Set the minimum magnification that the camera can be set to with this event handler. |
void |
startZooming()
Start animated zooming. |
void |
stopZooming()
Stop animated zooming. |
void |
zoomOneStep()
Do one zooming step, sleep a short amount, and schedule the next zooming step. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public ZoomEventHandler(ZNode node)
node - The node this event handler attaches to.| Method Detail |
public void setActive(boolean active)
active - True to make this event handler activepublic void mousePressed(ZMouseEvent e)
e - The event.public void mouseDragged(ZMouseEvent e)
e - The event.public void mouseReleased(ZMouseEvent e)
e - The event.public void mouseEntered(ZMouseEvent e)
public void mouseExited(ZMouseEvent e)
public void mouseClicked(ZMouseEvent e)
public void mouseMoved(ZMouseEvent e)
public void startZooming()
public void setMinMagnification(float newMinMag)
newMinMag - the new minimum magnificationpublic void setMaxMagnification(float newMaxMag)
newMaxMag - the new maximum magnificationpublic void stopZooming()
public void zoomOneStep()
|
Jazz API Documentation | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||