public class GFMarqueeSelectionTool
extends org.eclipse.gef.tools.AbstractTool
A Tool which selects multiple objects inside a rectangular area of a Graphical Viewer. If the SHIFT key is pressed at the beginning of the drag, the enclosed items will be appended to the current selection. If the MOD1 key is pressed at the beginning of the drag, the enclosed items will have their selection state inverted.
By default, only editparts whose figure's are on the primary layer will be considered within the enclosed rectangle.
| Modifier and Type | Field and Description |
|---|---|
static int |
BEHAVIOR_CONNECTIONS_TOUCHED
This behaviour selects connections that intersect the marquee rectangle.
|
static int |
BEHAVIOR_NODES_AND_CONNECTIONS
This behaviour selects nodes completely encompassed by the marquee
rectangle, and all connections between those nodes.
|
static int |
BEHAVIOR_NODES_CONTAINED
This behaviour selects nodes completely encompassed by the marquee
rectangle.
|
static java.lang.Object |
PROPERTY_MARQUEE_BEHAVIOR
The property to be used in
AbstractTool.setProperties(java.util.Map) for
setMarqueeBehavior(int). |
REQ_ADD, REQ_ALIGN, REQ_ALIGN_CHILDREN, REQ_CLONE, REQ_CONNECTION_END, REQ_CONNECTION_START, REQ_CREATE, REQ_CREATE_BENDPOINT, REQ_DELETE, REQ_DELETE_DEPENDANT, REQ_DIRECT_EDIT, REQ_MOVE, REQ_MOVE_BENDPOINT, REQ_MOVE_CHILDREN, REQ_OPEN, REQ_ORPHAN, REQ_ORPHAN_CHILDREN, REQ_RECONNECT_SOURCE, REQ_RECONNECT_TARGET, REQ_RESIZE, REQ_RESIZE_CHILDREN, REQ_SELECTION, REQ_SELECTION_HOVER| Constructor and Description |
|---|
GFMarqueeSelectionTool()
Creates a new MarqueeSelectionTool of default type
BEHAVIOR_NODES_CONTAINED. |
| Modifier and Type | Method and Description |
|---|---|
void |
deactivate()
Erases feedback if necessary and puts the tool into the terminal state.
|
void |
setMarqueeBehavior(int type)
Sets the type of parts that this tool will select.
|
void |
setViewer(org.eclipse.gef.EditPartViewer viewer)
Sets the viewer.
|
activate, commitDrag, focusGained, focusLost, keyDown, keyTraversed, keyUp, mouseDoubleClick, mouseDown, mouseDrag, mouseHover, mouseMove, mouseUp, mouseWheelScrolled, nativeDragFinished, nativeDragStarted, setDefaultCursor, setDisabledCursor, setEditDomain, setProperties, setUnloadWhenFinished, viewerEntered, viewerExitedpublic static final java.lang.Object PROPERTY_MARQUEE_BEHAVIOR
AbstractTool.setProperties(java.util.Map) for
setMarqueeBehavior(int).public static final int BEHAVIOR_NODES_CONTAINED
public static final int BEHAVIOR_CONNECTIONS_TOUCHED
public static final int BEHAVIOR_NODES_AND_CONNECTIONS
public GFMarqueeSelectionTool()
BEHAVIOR_NODES_CONTAINED.public void deactivate()
deactivate in interface org.eclipse.gef.Tooldeactivate in class org.eclipse.gef.tools.AbstractToolpublic void setMarqueeBehavior(int type)
type - BEHAVIOR_CONNECTIONS_TOUCHED or
BEHAVIOR_NODES_CONTAINED or
BEHAVIOR_NODES_AND_CONNECTIONSpublic void setViewer(org.eclipse.gef.EditPartViewer viewer)
setViewer in interface org.eclipse.gef.ToolsetViewer in class org.eclipse.gef.tools.AbstractToolviewer - the viewerTool.setViewer(org.eclipse.gef.EditPartViewer)