|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | 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.ZSelectionModifyHandler
ZSelectionModifyHandler 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:
ZSelectionManager
, ZCompositeSelectionHandler
, ZSelectionDeleteHandler
, ZSelectionMoveHandler
, ZSelectionScaleHandler
Nested Class Summary |
Nested classes inherited from class edu.umd.cs.jazz.event.ZFilteredEventHandler |
ZFilteredEventHandler.ZFilteredEventDispatcher |
Field Summary |
Fields inherited from class edu.umd.cs.jazz.event.ZFilteredEventHandler |
fFilteredEventDispatcher, fMouseFilter |
Constructor Summary | |
ZSelectionModifyHandler(ZSceneGraphObject aFilteredMouseEventSource, ZCanvas aIgnoredCanvas, ZGroup aMarqueeLayer) Deprecated. As of Jazz version 1.2, use ZSelectionModifyHandler(ZSceneGraphObject aFilteredMouseEventSource, ZGroup aMarqueeLayer) instead. |
|
ZSelectionModifyHandler(ZSceneGraphObject aFilteredMouseEventSource, ZGroup aMarqueeLayer) Construct a new ZSelectionModifyHandler. |
Method Summary | |
protected void |
dragInScreenCoords(ZMouseEvent e, java.awt.geom.Dimension2D aScreenDelta) Forward the message to modifyMarqueeSelection . |
protected void |
endDrag(ZMouseEvent e) Forward the message to endMarqueeSelection . |
protected void |
endMarqueeSelection(ZMouseEvent e) Remove the marquee visual leaf and set the last marquee selection to null. |
protected void |
filteredMousePressed(ZMouseEvent e) On mouse pressed try to select the node under the cursor. |
protected java.util.Collection |
getLastMarqueeSelection() Get the collection of nodes that were in the last marquee selection. |
ZGroup |
getMarqueeLayer() Get the layer that the marquee upon which the marquee should be drawn. |
ZVisualLeaf |
getMarqueeLeaf() Return the leaf from which the marquee visual component should hang. |
ZVisualComponent |
getMarqueeVisualComponent() Return the visual component used to draw the marquee. |
ZMouseFilter |
getMouseFilter() Modifying the selection works with BUTTON1 by default. |
protected java.util.Collection |
getNewMarqueeSelection(ZBounds aBounds) Return the collection of nodes that intersect aBounds from the interaction cameras perspective. |
protected ZNode |
getNodeToSelect(ZMouseEvent e) Return the node that should be selected for the given event, null if no node should be selected. |
protected ZBounds |
getResizedMarqueeBounds(ZMouseEvent e, java.awt.geom.Dimension2D aScreenDelta) Resize the marquee by aScreenDelta and return the resulting bounds. |
protected boolean |
isOptionSelection(ZMouseEvent e) Return true if the event is an option selection. |
protected void |
makeSelection(ZNode aNode, ZMouseEvent e) Select aNode. |
protected void |
modifyMarqueeSelection(ZMouseEvent e, java.awt.geom.Dimension2D aScreenDelta) Modify the current marquee selection by aScreenDelta. |
void |
setActive(boolean active) Specifies whether this event handler is active or not. |
protected void |
setLastMarqueeSelection(java.util.Collection aCollection) Set the collection of nodes that were in the last marquee selection. |
void |
setMarqueeBounds(ZBounds aBounds) Set the bounds of the marquee visual component to the new bounds. |
void |
setMarqueeLayer(ZGroup aGroup) Set the layer tha the marquee upon which the marquee should be drawn. |
void |
setMarqueeLeaf(ZVisualLeaf aMarquee) Set the leaf from which the marquee visual component should hang. |
void |
setMarqueeVisualComponent(ZVisualComponent aMarquee) Set the visual component used to draw the marquee. |
protected boolean |
shouldStartMarqueeSelection(ZMouseEvent e) Return true if no node is currently under the cursor that should be selected. |
protected void |
startDrag(ZMouseEvent e) Forward the message to startMarqueeSelection if shouldStartMarqueeSelection returns true. |
protected void |
startMarqueeSelection(ZMouseEvent e) Start a new marquee selection. |
protected void |
unselectAll() Unselect all selected nodes seen from the current interaction camera. |
Methods inherited from class edu.umd.cs.jazz.event.ZDragSequenceEventHandler |
drag, filteredMouseDragged, 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 ZSelectionModifyHandler(ZSceneGraphObject aFilteredMouseEventSource, ZGroup aMarqueeLayer)
aFilteredMouseEventSource
- the source for filtered ZMouseEvents and ZMouseMotionEvents. See the class comment to customize this behavior.public ZSelectionModifyHandler(ZSceneGraphObject aFilteredMouseEventSource, ZCanvas aIgnoredCanvas, ZGroup aMarqueeLayer)
ZSelectionModifyHandler(ZSceneGraphObject aFilteredMouseEventSource, ZGroup aMarqueeLayer)
instead.
Method Detail |
public ZMouseFilter getMouseFilter()
getMouseFilter
in class ZFilteredEventHandler
protected void filteredMousePressed(ZMouseEvent e)
filteredMousePressed
in class ZDragSequenceEventHandler
e
- the filtered mouse pressed event.protected void startDrag(ZMouseEvent e)
startMarqueeSelection
if shouldStartMarqueeSelection
returns true. Otherwise make the mouse filter reject all events until the next mouse pressed that it sees.
startDrag
in class ZDragSequenceEventHandler
e
- the event starting the drag sequence.protected void dragInScreenCoords(ZMouseEvent e, java.awt.geom.Dimension2D aScreenDelta)
modifyMarqueeSelection
.
dragInScreenCoords
in class ZDragSequenceEventHandler
e
- the event causing the drag.aScreenDelta
- the change in mouse position between the current and last filtered mouse events.protected void endDrag(ZMouseEvent e)
endMarqueeSelection
.
endDrag
in class ZDragSequenceEventHandler
e
- the event causing the end of the drag sequence.protected void makeSelection(ZNode aNode, ZMouseEvent e)
isOptionSelection
then option select the node, otherwise unselect all nodes and then select aNode.
protected ZNode getNodeToSelect(ZMouseEvent e)
protected void unselectAll()
protected void startMarqueeSelection(ZMouseEvent e)
protected void modifyMarqueeSelection(ZMouseEvent e, java.awt.geom.Dimension2D aScreenDelta)
protected void endMarqueeSelection(ZMouseEvent e)
protected boolean shouldStartMarqueeSelection(ZMouseEvent e)
protected ZBounds getResizedMarqueeBounds(ZMouseEvent e, java.awt.geom.Dimension2D aScreenDelta)
protected java.util.Collection getNewMarqueeSelection(ZBounds aBounds)
protected java.util.Collection getLastMarqueeSelection()
protected void setLastMarqueeSelection(java.util.Collection aCollection)
public ZGroup getMarqueeLayer()
public void setMarqueeLayer(ZGroup aGroup)
public ZVisualLeaf getMarqueeLeaf()
public void setMarqueeLeaf(ZVisualLeaf aMarquee)
public ZVisualComponent getMarqueeVisualComponent()
public void setMarqueeVisualComponent(ZVisualComponent aMarquee)
public void setMarqueeBounds(ZBounds aBounds)
protected boolean isOptionSelection(ZMouseEvent e)
public void setActive(boolean active)
setActive
in interface ZEventHandler
setActive
in class ZFilteredEventHandler
active
- true
to make this event handler active.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |