|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--edu.umd.cs.jazz.event.ZEventHandler
|
+--edu.umd.cs.jazz.event.ZSelectionEventHandler
ZSelectionEventHandler provides event handlers for basic selection interaction. Click to select/unselect an item. Shift-click to extend the selection. Click-and-drag on the background to marquee select. Drag a selected item to move all of the selected items.
| Field Summary | |
protected int |
deleteKey
|
protected ZNode |
marquee
|
protected java.awt.geom.Point2D |
pressPt
|
protected java.util.Vector |
prevMotionSelection
|
protected java.awt.geom.Point2D |
prevPt
|
protected java.awt.geom.Point2D |
pt
|
protected int |
scaleDownKey
|
protected int |
scaleUpKey
|
protected ZNode |
selectionLayer
|
protected ZNode |
selNode
|
protected int |
translateDownKey
|
protected int |
translateLeftKey
|
protected int |
translateRightKey
|
protected int |
translateUpKey
|
| Fields inherited from class edu.umd.cs.jazz.event.ZEventHandler |
activated,
component,
keyAdapter,
mouseAdapter,
mouseMotionAdapter,
surface |
| Constructor Summary | |
ZSelectionEventHandler(java.awt.Component c,
ZSurface v,
ZNode selectionLayer)
Constructs a new ZSelectionEventHandler. |
|
| Method Summary | |
void |
deactivate()
Deactivates this event handler. |
protected ZNode |
getTopNode(ZNode node)
Return the ancestor node whose parent is layer. |
void |
keyPressed(java.awt.event.KeyEvent e)
Key press event handler |
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 |
protected void |
preScale(ZNode node,
float dz,
float x,
float y)
Scale the node using preConcatenation which will result in the scale happening in global coordinates. |
protected void |
preTranslate(ZNode node,
float dx,
float dy)
Translate the node using preConcatenation which will result in the translate happening in global coordinates. |
protected void |
selectGroupNode(ZNode node)
select a group of items by putting a rectangle around all items in the group. |
void |
setSelectionLayer(ZNode node)
Specify the node that the selection "marquee" should be put on. |
protected void |
unselectAll(ZCamera camera,
ZNode layer)
Unselect all selected items, also remove any 'grouping rectangles' from selected groups of items. |
| Methods inherited from class edu.umd.cs.jazz.event.ZEventHandler |
activate,
getCamera,
getComponent,
getSurface,
keyReleased,
keyTyped,
mouseMoved |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected java.awt.geom.Point2D pt
protected java.util.Vector prevMotionSelection
protected ZNode selNode
protected java.awt.geom.Point2D prevPt
protected java.awt.geom.Point2D pressPt
protected ZNode marquee
protected ZNode selectionLayer
protected int scaleUpKey
protected int scaleDownKey
protected int translateLeftKey
protected int translateRightKey
protected int translateUpKey
protected int translateDownKey
protected int deleteKey
| Constructor Detail |
public ZSelectionEventHandler(java.awt.Component c,
ZSurface v,
ZNode selectionLayer)
c - The component that this event handler listens to events onv - The camera that is selected within| Method Detail |
public void deactivate()
public void setSelectionLayer(ZNode node)
public void keyPressed(java.awt.event.KeyEvent e)
e - The event.
protected void unselectAll(ZCamera camera,
ZNode layer)
protected void selectGroupNode(ZNode node)
node - The node whose descendants are the items in the grouped.public void mousePressed(java.awt.event.MouseEvent e)
e - The event.protected ZNode getTopNode(ZNode node)
- node a node.public void mouseDragged(java.awt.event.MouseEvent e)
e - The event.public void mouseReleased(java.awt.event.MouseEvent e)
e - The event.
protected void preScale(ZNode node,
float dz,
float x,
float y)
protected void preTranslate(ZNode node,
float dx,
float dy)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||