|
Modelers | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gef.util.FlagSupport
org.eclipse.gef.tools.AbstractTool
org.topcased.modeler.editor.palette.MarqueeSelectionTool
public class MarqueeSelectionTool
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.gef.tools.AbstractTool |
---|
org.eclipse.gef.tools.AbstractTool.Input |
Field Summary | |
---|---|
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. |
protected static org.eclipse.gef.Request |
MARQUEE_REQUEST
|
static java.lang.Object |
PROPERTY_MARQUEE_BEHAVIOR
The property to be used in AbstractTool.setProperties(java.util.Map) for
setMarqueeBehavior(int) . |
Fields inherited from class org.eclipse.gef.tools.AbstractTool |
---|
MAX_FLAG, MAX_STATE, MOUSE_BUTTON_ANY, MOUSE_BUTTON1, MOUSE_BUTTON2, MOUSE_BUTTON3, PROPERTY_UNLOAD_WHEN_FINISHED, STATE_ACCESSIBLE_DRAG, STATE_ACCESSIBLE_DRAG_IN_PROGRESS, STATE_DRAG, STATE_DRAG_IN_PROGRESS, STATE_INITIAL, STATE_INVALID, STATE_TERMINAL |
Fields inherited from interface org.eclipse.gef.RequestConstants |
---|
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 Summary | |
---|---|
MarqueeSelectionTool()
Creates a new MarqueeSelectionTool of default type BEHAVIOR_NODES_CONTAINED . |
Method Summary | |
---|---|
protected void |
applyProperty(java.lang.Object key,
java.lang.Object value)
|
protected void |
calculateConnections(java.util.Collection newSelections,
java.util.Collection deselections)
|
protected void |
calculateNewSelection(java.util.Collection newSelections,
java.util.Collection deselections)
|
void |
deactivate()
Erases feedback if necessary and puts the tool into the terminal state. |
protected java.util.Set |
getAllChildren()
|
protected void |
getAllChildren(org.eclipse.gef.EditPart editPart,
java.util.Set allChildren)
|
protected java.lang.String |
getCommandName()
|
protected java.lang.String |
getDebugName()
|
protected int |
getMarqueeBehavior()
|
protected org.eclipse.draw2d.geometry.Rectangle |
getMarqueeSelectionRectangle()
|
protected int |
getSelectionMode()
|
protected boolean |
handleButtonDown(int button)
|
protected boolean |
handleButtonUp(int button)
|
protected boolean |
handleDragInProgress()
|
protected boolean |
handleFocusLost()
|
protected boolean |
handleInvalidInput()
This method is called when mouse or keyboard input is invalid and erases the feedback. |
protected boolean |
handleKeyDown(org.eclipse.swt.events.KeyEvent e)
Handles high-level processing of a key down event. |
protected boolean |
isFigureVisible(org.eclipse.draw2d.IFigure fig)
|
protected boolean |
isViewerImportant(org.eclipse.gef.EditPartViewer viewer)
MarqueeSelectionTool is only interested in GraphicalViewers, not TreeViewers. |
void |
setMarqueeBehavior(int type)
Sets the type of parts that this tool will select. |
void |
setViewer(org.eclipse.gef.EditPartViewer viewer)
|
Methods inherited from class org.eclipse.gef.tools.AbstractTool |
---|
activate, addFeedback, calculateCursor, commitDrag, createOperationSet, debug, executeCommand, executeCurrentCommand, focusGained, focusLost, getCommand, getCurrentCommand, getCurrentInput, getCurrentViewer, getDebugNameForState, getDefaultCursor, getDisabledCursor, getDomain, getDragMoveDelta, getLocation, getOperationSet, getStartLocation, getState, handleCommandStackChanged, handleDoubleClick, handleDrag, handleDragStarted, handleFinished, handleFocusGained, handleHover, handleKeyTraversed, handleKeyUp, handleMove, handleNativeDragFinished, handleNativeDragStarted, handleViewerEntered, handleViewerExited, isActive, isHoverActive, isInState, keyDown, keyTraversed, keyUp, mouseDoubleClick, mouseDown, mouseDrag, mouseHover, mouseMove, mouseUp, mouseWheelScrolled, movedPastThreshold, nativeDragFinished, nativeDragStarted, performViewerMouseWheel, reactivate, refreshCursor, releaseToolCapture, removeFeedback, resetFlags, setCurrentCommand, setCursor, setDefaultCursor, setDisabledCursor, setEditDomain, setHoverActive, setProperties, setStartLocation, setState, setToolCapture, setUnloadWhenFinished, stateTransition, unloadWhenFinished, viewerEntered, viewerExited |
Methods inherited from class org.eclipse.gef.util.FlagSupport |
---|
getFlag, setFlag |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.gef.DragTracker |
---|
commitDrag |
Methods inherited from interface org.eclipse.gef.Tool |
---|
activate, focusGained, focusLost, keyDown, keyTraversed, keyUp, mouseDoubleClick, mouseDown, mouseDrag, mouseHover, mouseMove, mouseUp, mouseWheelScrolled, nativeDragFinished, nativeDragStarted, setEditDomain, setProperties, viewerEntered, viewerExited |
Field Detail |
---|
public 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
protected static final org.eclipse.gef.Request MARQUEE_REQUEST
Constructor Detail |
---|
public MarqueeSelectionTool()
BEHAVIOR_NODES_CONTAINED
.
Method Detail |
---|
protected void applyProperty(java.lang.Object key, java.lang.Object value)
applyProperty
in class org.eclipse.gef.tools.AbstractTool
AbstractTool.applyProperty(java.lang.Object, java.lang.Object)
protected void calculateConnections(java.util.Collection newSelections, java.util.Collection deselections)
protected void calculateNewSelection(java.util.Collection newSelections, java.util.Collection deselections)
public void deactivate()
deactivate
in interface org.eclipse.gef.Tool
deactivate
in class org.eclipse.gef.tools.AbstractTool
protected java.util.Set getAllChildren()
protected void getAllChildren(org.eclipse.gef.EditPart editPart, java.util.Set allChildren)
protected java.lang.String getCommandName()
getCommandName
in class org.eclipse.gef.tools.AbstractTool
AbstractTool.getCommandName()
protected java.lang.String getDebugName()
getDebugName
in class org.eclipse.gef.tools.AbstractTool
AbstractTool.getDebugName()
protected org.eclipse.draw2d.geometry.Rectangle getMarqueeSelectionRectangle()
protected int getSelectionMode()
protected boolean handleButtonDown(int button)
handleButtonDown
in class org.eclipse.gef.tools.AbstractTool
AbstractTool.handleButtonDown(int)
protected boolean handleButtonUp(int button)
handleButtonUp
in class org.eclipse.gef.tools.AbstractTool
AbstractTool.handleButtonUp(int)
protected boolean handleDragInProgress()
handleDragInProgress
in class org.eclipse.gef.tools.AbstractTool
AbstractTool.handleDragInProgress()
protected boolean handleFocusLost()
handleFocusLost
in class org.eclipse.gef.tools.AbstractTool
AbstractTool.handleFocusLost()
protected boolean handleInvalidInput()
handleInvalidInput
in class org.eclipse.gef.tools.AbstractTool
true
protected boolean handleKeyDown(org.eclipse.swt.events.KeyEvent e)
KeyHandler
,
via KeyHandler.keyPressed(KeyEvent)
.
handleKeyDown
in class org.eclipse.gef.tools.AbstractTool
AbstractTool.handleKeyDown(KeyEvent)
protected boolean isFigureVisible(org.eclipse.draw2d.IFigure fig)
protected boolean isViewerImportant(org.eclipse.gef.EditPartViewer viewer)
isViewerImportant
in class org.eclipse.gef.tools.AbstractTool
AbstractTool.isViewerImportant(org.eclipse.gef.EditPartViewer)
public void setMarqueeBehavior(int type)
type
- BEHAVIOR_CONNECTIONS_TOUCHED
or BEHAVIOR_NODES_CONTAINED
or BEHAVIOR_NODES_AND_CONNECTIONS
protected int getMarqueeBehavior()
public void setViewer(org.eclipse.gef.EditPartViewer viewer)
setViewer
in interface org.eclipse.gef.Tool
setViewer
in class org.eclipse.gef.tools.AbstractTool
Tool.setViewer(org.eclipse.gef.EditPartViewer)
|
Modelers | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.