|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.view.ViewMode | +--y.view.AbstractSelectionBoxMode | +--y.view.SelectionBoxMode
This ViewMode is responsible for letting the user open up a selection box. Graph elements inside that box will automatically be selected.
This mode never selects nodes and edges at the same time. What actually gets selected depends on whether or not the shift key is pressed down when opening the selection box and on the set of currently selected graph elements.
If the shift key is pressed down when opening the selection box the new selection will consist of the previously selected elements plus the ones that lie inside of the selection box.
If the graph elements already selected were edges then the shiftkey driven union mechanism selects more edges. Otherwise more nodes and bends will be selected.
Field Summary |
Fields inherited from class y.view.ViewMode |
lastClickEvent, lastDragEvent, lastPressEvent, lastReleaseEvent, originalX, originalY, view |
Constructor Summary | |
SelectionBoxMode()
Instantiates a new SelectionBoxMode. |
|
SelectionBoxMode(ViewContainer view)
Instantiates a new SelectionBoxMode for a given ViewContainer |
Method Summary | |
protected boolean |
belongsToSelection(Bend b,
Rectangle2D box)
Callback method that decides whether or not the given bend should be selected, by the given selection box bounds. |
protected boolean |
belongsToSelection(Edge e,
Rectangle2D box)
Callback method that decides whether or not the given edge should be selected, by the given selection box bounds. |
protected boolean |
belongsToSelection(Node v,
Rectangle2D box)
Callback method that decides whether or not the given node should be selected, by the given selection box bounds. |
protected void |
selectionBoxAction(Rectangle sb,
boolean shiftMode)
Selects graph objects within selection box bounds. |
Methods inherited from class y.view.AbstractSelectionBoxMode |
mouseDraggedLeft, mousePressedLeft, mouseReleasedLeft, mouseShiftPressedLeft, mouseShiftReleasedLeft, selectionBoxAction, updateDoubleSelectionBox |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SelectionBoxMode(ViewContainer view)
public SelectionBoxMode()
Method Detail |
protected void selectionBoxAction(Rectangle sb, boolean shiftMode)
selectionBoxAction
in class AbstractSelectionBoxMode
sb
- The position and size of the selection box.shiftMode
- true if shift was pressed when
box was closed, false otherwise.
protected boolean belongsToSelection(Node v, Rectangle2D box)
protected boolean belongsToSelection(Edge e, Rectangle2D box)
protected boolean belongsToSelection(Bend b, Rectangle2D box)
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |