|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.gef.util.FlagSupport | +--org.eclipse.gef.tools.AbstractTool | +--org.eclipse.gef.tools.TargetingTool | +--org.eclipse.gef.tools.SelectionTool
Tool to select and manipulate figures. A selection tool is in one of three states, e.g., background selection, figure selection, handle manipulation. The different states are handled by different child tools.
Nested Class Summary |
Nested classes inherited from class org.eclipse.gef.tools.AbstractTool |
AbstractTool.Input |
Field Summary | |
protected static int |
MAX_FLAG
|
protected static int |
MAX_STATE
|
protected static int |
STATE_TRAVERSE_HANDLE
|
Fields inherited from class org.eclipse.gef.tools.AbstractTool |
MOUSE_BUTTON_ANY, MOUSE_BUTTON1, MOUSE_BUTTON2, MOUSE_BUTTON3, 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_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 | |
SelectionTool()
|
Method Summary | |
protected void |
createHoverRequest()
|
protected Request |
createTargetRequest()
|
void |
deactivate()
Deactivates the tool. |
protected void |
eraseHoverFeedback()
|
protected String |
getCommandName()
Returns the name identifier of the command that the tool is currently looking for. |
protected String |
getDebugName()
Returns the debug name for this tool. |
protected String |
getDebugNameForState(int state)
Returns a String representation of the given state for debug purposes. |
protected DragTracker |
getDragTracker()
|
protected Request |
getTargetHoverRequest()
|
protected EditPartViewer.Conditional |
getTargetingConditional()
|
protected boolean |
handleButtonDown(int button)
Called when the mouse button has been pressed. |
protected boolean |
handleButtonUp(int button)
Handles the high-level processing of a mouse release. |
protected boolean |
handleFocusLost()
Handles high-level processing of a focus lost event. |
protected boolean |
handleHover()
Handles high-level processing of a mouse hover event. |
protected boolean |
handleHoverStop()
|
protected boolean |
handleKeyDown(KeyEvent e)
Handles high-level processing of a key down event. |
protected boolean |
handleKeyUp(KeyEvent e)
Handles high-level processing of a key up event. |
protected boolean |
handleMove()
Handles high-level processing of a mouse move. |
boolean |
handleNativeDragFinished(DragSourceEvent event)
|
boolean |
handleNativeDragStarted(DragSourceEvent event)
|
protected boolean |
handleViewerExited()
Called when the mouse exits an EditPartViewer. |
void |
keyDown(KeyEvent evt,
EditPartViewer viewer)
Processes a KeyDown event for the given viewer. |
void |
keyUp(KeyEvent evt,
EditPartViewer viewer)
Processes a KeyUp event for the given viewer. |
void |
mouseDoubleClick(MouseEvent e,
EditPartViewer viewer)
Handles mouse double click events within a viewer. |
void |
mouseDown(MouseEvent e,
EditPartViewer viewer)
Handles mouse down events within a viewer. |
void |
mouseDrag(MouseEvent e,
EditPartViewer viewer)
Handles mouse drag events. |
void |
mouseHover(MouseEvent me,
EditPartViewer viewer)
Handles mouse moves (if the mouse button is up) within a viewer. |
void |
mouseMove(MouseEvent me,
EditPartViewer viewer)
Handles mouse moves (if the mouse button is up) within a viewer. |
void |
mouseUp(MouseEvent e,
EditPartViewer viewer)
Handles mouse up events. |
protected void |
refreshCursor()
Selects the appropriate cursor. |
void |
setDragTracker(DragTracker newDragTracker)
|
protected void |
showHoverFeedback()
|
protected void |
updateHoverRequest()
|
protected void |
updateTargetRequest()
Subclasses should override to update the target request. |
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 |
Field Detail |
protected static final int MAX_FLAG
protected static final int STATE_TRAVERSE_HANDLE
protected static final int MAX_STATE
Constructor Detail |
public SelectionTool()
Method Detail |
protected void createHoverRequest()
protected Request createTargetRequest()
createTargetRequest
in class TargetingTool
public void deactivate()
deactivate
in interface Tool
deactivate
in class TargetingTool
AbstractTool.activate()
protected void eraseHoverFeedback()
protected String getCommandName()
AbstractTool
getCommandName
in class AbstractTool
protected String getDebugName()
AbstractTool
getDebugName
in class AbstractTool
protected DragTracker getDragTracker()
protected EditPartViewer.Conditional getTargetingConditional()
getTargetingConditional
in class TargetingTool
org.eclipse.gef.tools.TargetingTool#getTargetConditional()
protected Request getTargetHoverRequest()
protected boolean handleButtonDown(int button)
AbstractTool
handleButtonDown
in class AbstractTool
protected boolean handleButtonUp(int button)
AbstractTool
handleButtonUp
in class AbstractTool
AbstractTool.mouseUp(MouseEvent, EditPartViewer)
protected boolean handleFocusLost()
AbstractTool
handleFocusLost
in class AbstractTool
AbstractTool.focusLost(FocusEvent, EditPartViewer)
protected boolean handleHover()
AbstractTool
handleHover
in class AbstractTool
AbstractTool.mouseHover(MouseEvent, EditPartViewer)
protected boolean handleHoverStop()
handleHoverStop
in class TargetingTool
protected boolean handleKeyDown(KeyEvent e)
AbstractTool
handleKeyDown
in class AbstractTool
AbstractTool.keyDown(KeyEvent, EditPartViewer)
protected boolean handleKeyUp(KeyEvent e)
AbstractTool
handleKeyUp
in class AbstractTool
AbstractTool.keyUp(KeyEvent, EditPartViewer)
protected boolean handleMove()
AbstractTool
handleMove
in class AbstractTool
AbstractTool.mouseMove(MouseEvent, EditPartViewer)
public boolean handleNativeDragFinished(DragSourceEvent event)
handleNativeDragFinished
in class AbstractTool
Tool.nativeDragFinished(DragSourceEvent, EditPartViewer)
public boolean handleNativeDragStarted(DragSourceEvent event)
handleNativeDragStarted
in class AbstractTool
Tool.nativeDragStarted(DragSourceEvent, EditPartViewer)
protected boolean handleViewerExited()
AbstractTool
handleViewerExited
in class TargetingTool
public void keyDown(KeyEvent evt, EditPartViewer viewer)
AbstractTool
AbstractTool.handleKeyDown(KeyEvent)
.
keyDown
in interface Tool
keyDown
in class AbstractTool
evt
- the SWT KeyEventviewer
- the Viewer which received a key presspublic void keyUp(KeyEvent evt, EditPartViewer viewer)
AbstractTool
AbstractTool.handleKeyUp(KeyEvent)
.
keyUp
in interface Tool
keyUp
in class AbstractTool
evt
- the SWT KeyEventviewer
- the Viewer which received a key uppublic void mouseDown(MouseEvent e, EditPartViewer viewer)
AbstractTool
AbstractTool.handleButtonDown(int)
.
mouseDown
in interface Tool
mouseDown
in class AbstractTool
e
- the SWT mouse eventviewer
- the Viewer which received a mouse downpublic void mouseDoubleClick(MouseEvent e, EditPartViewer viewer)
AbstractTool
AbstractTool.handleDoubleClick(int)
.
mouseDoubleClick
in interface Tool
mouseDoubleClick
in class AbstractTool
e
- the SWT mouse eventviewer
- the Viewer which received a double-clickpublic void mouseDrag(MouseEvent e, EditPartViewer viewer)
mouseDrag
in interface Tool
mouseDrag
in class AbstractTool
e
- the SWT mouse eventviewer
- the Viewer which received a dragpublic void mouseHover(MouseEvent me, EditPartViewer viewer)
mouseHover
in interface Tool
mouseHover
in class AbstractTool
me
- the SWT mouse eventviewer
- the Viewer which received a mouse downMouseTrackListener.mouseHover(MouseEvent)
public void mouseMove(MouseEvent me, EditPartViewer viewer)
AbstractTool
AbstractTool.handleMove()
.
mouseMove
in interface Tool
mouseMove
in class AbstractTool
me
- the SWT mouse eventviewer
- the Viewer which received a mouse moveTool.mouseDrag(MouseEvent, EditPartViewer)
public void mouseUp(MouseEvent e, EditPartViewer viewer)
mouseUp
in interface Tool
mouseUp
in class AbstractTool
e
- the SWT mouse eventviewer
- the Viewer which received a mouse upprotected void refreshCursor()
AbstractTool
refreshCursor
in class AbstractTool
AbstractTool.calculateCursor()
public void setDragTracker(DragTracker newDragTracker)
protected void showHoverFeedback()
protected void updateHoverRequest()
protected void updateTargetRequest()
TargetingTool
updateTargetRequest
in class TargetingTool
protected String getDebugNameForState(int state)
AbstractTool
getDebugNameForState
in class AbstractTool
|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |