|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--venice.VSelectionModifyHandler
VSelectionModifyHandler is a ZEventHandler that allows items to be selected with the mouse, and maintains the current selection. As an event handler, ZSelectionManager directly supports the following actions:
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 ZSELECTIONMODIFYHANDLER FROM JAZZ CODE!
Field Summary | |
private boolean |
active
true when event handler is active |
private edu.umd.cs.jazz.ZCamera |
activeCamera
camera this event handler watches |
private int |
allButton1ButShiftMask
|
private int |
allButton1Mask
|
private int |
allButton3ButShiftMask
|
private edu.umd.cs.jazz.util.ZCanvas |
canvas
canvas this event handler attaches to |
private boolean |
consumed
|
private java.awt.geom.Point2D |
dragPt
|
private boolean |
globallyActive
true if event handler is globally active |
private edu.umd.cs.jazz.ZCamera |
interactionCamera
the camera with which this handler is interacting |
private java.util.ArrayList |
itemsToRemove
|
private edu.umd.cs.jazz.ZVisualLeaf |
marquee
|
private edu.umd.cs.jazz.ZGroup |
marqueeLayer
parent node to use for marquee selection |
private boolean |
moved
|
private edu.umd.cs.jazz.ZNode |
node
node this event handler attaches to |
private java.awt.geom.Point2D |
pressPt
|
private java.util.ArrayList |
prevMotionSelection
|
private java.awt.geom.Point2D |
prevPt
|
private java.awt.geom.Point2D |
pt1
|
private java.awt.geom.Point2D |
pt2
|
private edu.umd.cs.jazz.ZNode |
selNode
|
Constructor Summary | |
VSelectionModifyHandler(edu.umd.cs.jazz.ZNode node,
edu.umd.cs.jazz.ZCamera camera,
edu.umd.cs.jazz.util.ZCanvas canvas,
edu.umd.cs.jazz.ZGroup marqueeLayer)
Construct a new VSelectionModifyHandler. |
|
VSelectionModifyHandler(edu.umd.cs.jazz.ZNode node,
edu.umd.cs.jazz.util.ZCanvas canvas,
edu.umd.cs.jazz.ZGroup marqueeLayer)
Construct a new VSelectionModifyHandler. |
Method Summary | |
edu.umd.cs.jazz.ZCamera |
getCamera()
Returns the camera on which this event handler is watching for selection change |
edu.umd.cs.jazz.util.ZCanvas |
getCanvas()
Returns the canvas to which this selection manager is attached. |
edu.umd.cs.jazz.ZGroup |
getMarqueeLayer()
Determine the "marquee" layer that is used for selection. |
edu.umd.cs.jazz.ZNode |
getNode()
Returns the node to which this selection manager is attached. |
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 |
void |
setActive(boolean active)
Specifies whether this event handler is active |
void |
setMarqueeLayer(edu.umd.cs.jazz.ZGroup layer)
Specify the node that the selection "marquee" should be put on. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private boolean active
private boolean globallyActive
private edu.umd.cs.jazz.ZNode node
private edu.umd.cs.jazz.ZCamera activeCamera
private edu.umd.cs.jazz.ZCamera interactionCamera
private edu.umd.cs.jazz.util.ZCanvas canvas
private edu.umd.cs.jazz.ZGroup marqueeLayer
private java.util.ArrayList prevMotionSelection
private java.util.ArrayList itemsToRemove
private edu.umd.cs.jazz.ZNode selNode
private boolean moved
private boolean consumed
private transient java.awt.geom.Point2D pt1
private transient java.awt.geom.Point2D pt2
private transient java.awt.geom.Point2D pressPt
private transient java.awt.geom.Point2D dragPt
private transient java.awt.geom.Point2D prevPt
private edu.umd.cs.jazz.ZVisualLeaf marquee
private int allButton1Mask
private int allButton1ButShiftMask
private int allButton3ButShiftMask
Constructor Detail |
public VSelectionModifyHandler(edu.umd.cs.jazz.ZNode node, edu.umd.cs.jazz.util.ZCanvas canvas, edu.umd.cs.jazz.ZGroup marqueeLayer)
node
- The node this event handler attaches to.canvas
- The canvas this event handler attaches tomarqueeLayer
- The layer to draw the marquee onpublic VSelectionModifyHandler(edu.umd.cs.jazz.ZNode node, edu.umd.cs.jazz.ZCamera camera, edu.umd.cs.jazz.util.ZCanvas canvas, edu.umd.cs.jazz.ZGroup marqueeLayer)
node
- The node this event handler attaches to.camera
- The camera to which this event handler attaches.canvas
- The canvas this event handler attaches tomarqueeLayer
- The layer to draw the marquee onMethod 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 edu.umd.cs.jazz.ZNode getNode()
public edu.umd.cs.jazz.ZCamera getCamera()
public edu.umd.cs.jazz.util.ZCanvas getCanvas()
public void setMarqueeLayer(edu.umd.cs.jazz.ZGroup layer)
layer
- The node that the marquee should be put underpublic edu.umd.cs.jazz.ZGroup getMarqueeLayer()
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
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |