|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--venice.VZoomEventHandler
VZoomEventhandler provides event handlers for basic zooming of a Jazz camera with the right and left buttons. The interaction is that the left button zooms in and right zooms out. Zooming volume can be changed. Class is derived from jazz ZoomEventHandler.
This event handler will properly pan within internal cameras if the clicked within an internal camera.
Warning: Serialized and ZSerialized objects of this class will not be compatible with future Jazz releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Jazz. A future release of Jazz will provide support for long term persistence.
THIS IS A MODIFIED VERSION OF ZOOMEVENTHANDLER FROM JAZZ CODE!
Inner Class Summary | |
protected class |
VZoomEventHandler.ZoomEventState
Provides indirect access this event handlers private state. |
Field Summary | |
private boolean |
active
|
private edu.umd.cs.jazz.ZCamera |
activeCamera
|
private int |
allButton1Mask
|
private int |
allButton3Mask
|
private java.awt.geom.Point2D |
currentScreenPoint
|
private double |
dx
|
private boolean |
globallyActive
|
private edu.umd.cs.jazz.ZCamera |
interactionCamera
|
private boolean |
isZooming
|
private double |
maxMag
|
private double |
minMag
|
private edu.umd.cs.jazz.ZNode |
node
|
private java.awt.geom.Point2D |
pressObjectPoint
|
private java.awt.geom.Point2D |
pressScreenPoint
|
private VZoomEventHandler.ZoomEventState |
zoomEventState
|
Constructor Summary | |
VZoomEventHandler(edu.umd.cs.jazz.ZNode node)
Constructs a new ZoomEventHandler. |
|
VZoomEventHandler(edu.umd.cs.jazz.ZNode node,
edu.umd.cs.jazz.ZCamera camera)
Constructs a new ZoomEventHandler. |
Method Summary | |
protected java.awt.geom.AffineTransform |
generateNextViewTransform(VZoomEventHandler.ZoomEventState state,
int in)
Return the next view transform for the interaction cameras zooming sequence. |
boolean |
isActive()
Determines if this event handler is active. |
void |
mouseClicked(edu.umd.cs.jazz.event.ZMouseEvent e)
Invoked when the mouse has been clicked on a component. |
void |
mouseDragged(edu.umd.cs.jazz.event.ZMouseEvent e)
Mouse drag event handler |
void |
mouseEntered(edu.umd.cs.jazz.event.ZMouseEvent e)
Invoked when the mouse enters a component. |
void |
mouseExited(edu.umd.cs.jazz.event.ZMouseEvent e)
Invoked when the mouse exits a component. |
void |
mouseMoved(edu.umd.cs.jazz.event.ZMouseEvent e)
Invoked when the mouse button has been moved on a node (with no buttons no down). |
void |
mousePressed(edu.umd.cs.jazz.event.ZMouseEvent e)
Mouse press event handler |
void |
mouseReleased(edu.umd.cs.jazz.event.ZMouseEvent e)
Mouse release event handler |
private void |
readObject(java.io.ObjectInputStream in)
|
void |
setActive(boolean active)
Specifies whether this event handler is active or not. |
void |
setDx(int value)
|
void |
setMaxMagnification(double newMaxMag)
Set the maximum magnification that the camera can be set to with this event handler. |
void |
setMinMagnification(double newMinMag)
Set the minimum magnification that the camera can be set to with this event handler. |
void |
startZooming(int in)
Start animated zooming. |
void |
stopZooming()
Stop animated zooming. |
void |
zoomOneStep(int in)
Do one zooming step, sleep a short amount, and schedule the next zooming step. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private transient edu.umd.cs.jazz.ZCamera interactionCamera
private transient java.awt.geom.Point2D currentScreenPoint
private transient java.awt.geom.Point2D pressObjectPoint
private transient java.awt.geom.Point2D pressScreenPoint
private double minMag
private double maxMag
private boolean isZooming
private boolean active
private boolean globallyActive
private edu.umd.cs.jazz.ZNode node
private edu.umd.cs.jazz.ZCamera activeCamera
private VZoomEventHandler.ZoomEventState zoomEventState
private double dx
private int allButton3Mask
private int allButton1Mask
Constructor Detail |
public VZoomEventHandler(edu.umd.cs.jazz.ZNode node)
node
- The node this event handler attaches to.public VZoomEventHandler(edu.umd.cs.jazz.ZNode node, edu.umd.cs.jazz.ZCamera camera)
node
- The node this event handler attaches to.camera
- The camera to which this event handler attachesMethod Detail |
public void setActive(boolean active)
setActive
in interface edu.umd.cs.jazz.event.ZEventHandler
active
- True to make this event handler activepublic boolean isActive()
isActive
in interface edu.umd.cs.jazz.event.ZEventHandler
public void mousePressed(edu.umd.cs.jazz.event.ZMouseEvent e)
mousePressed
in interface edu.umd.cs.jazz.event.ZMouseListener
e
- The event.public void mouseDragged(edu.umd.cs.jazz.event.ZMouseEvent e)
mouseDragged
in interface edu.umd.cs.jazz.event.ZMouseMotionListener
e
- The event.public void mouseReleased(edu.umd.cs.jazz.event.ZMouseEvent e)
mouseReleased
in interface edu.umd.cs.jazz.event.ZMouseListener
e
- The event.public void mouseEntered(edu.umd.cs.jazz.event.ZMouseEvent e)
mouseEntered
in interface edu.umd.cs.jazz.event.ZMouseListener
public void mouseExited(edu.umd.cs.jazz.event.ZMouseEvent e)
mouseExited
in interface edu.umd.cs.jazz.event.ZMouseListener
public void mouseClicked(edu.umd.cs.jazz.event.ZMouseEvent e)
mouseClicked
in interface edu.umd.cs.jazz.event.ZMouseListener
public void mouseMoved(edu.umd.cs.jazz.event.ZMouseEvent e)
mouseMoved
in interface edu.umd.cs.jazz.event.ZMouseMotionListener
public void startZooming(int in)
public void setMinMagnification(double newMinMag)
newMinMag
- the new minimum magnificationpublic void setMaxMagnification(double newMaxMag)
newMaxMag
- the new maximum magnificationpublic void stopZooming()
public void zoomOneStep(int in)
protected java.awt.geom.AffineTransform generateNextViewTransform(VZoomEventHandler.ZoomEventState state, int in)
state
- provides access to the current state of the event handler.
ZoomEventState is declared as a protected inner class in ZoomEventHandler.public void setDx(int value)
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |