org.eclipse.gef.tools
Class TargetingTool
java.lang.Object
|
+--org.eclipse.gef.internal.FlagSupport
|
+--org.eclipse.gef.tools.AbstractTool
|
+--org.eclipse.gef.tools.TargetingTool
- All Implemented Interfaces:
- RequestConstants, Tool
- Direct Known Subclasses:
- AbstractConnectionCreationTool, ConnectionEndpointTracker, CreationTool, SelectEditPartTracker, SelectionTool
- public abstract class TargetingTool
- extends AbstractTool
|
Field Summary |
protected static int |
MAX_FLAG
|
| Fields inherited from class org.eclipse.gef.tools.AbstractTool |
MAX_STATE, 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_CHILD, REQ_ALIGN_CHILDREN, REQ_ANCESTOR_DELETED, REQ_CONNECTION_END, REQ_CONNECTION_START, REQ_CREATE, REQ_CREATE_BENDPOINT, REQ_DELETE, REQ_DELETE_BENDPOINT, REQ_DELETE_DEPENDANT, REQ_DIRECT_EDIT, REQ_MOVE, REQ_MOVE_BENDPOINT, REQ_MOVE_CHILD, REQ_MOVE_CHILDREN, REQ_ORPHAN, REQ_ORPHAN_CHILDREN, REQ_RECONNECT_END, REQ_RECONNECT_SOURCE, REQ_RECONNECT_START, REQ_RECONNECT_TARGET, REQ_RESIZE, REQ_RESIZE_CHILD, REQ_RESIZE_CHILDREN, REQ_SELECTION, REQ_SELECTION_HOVER, REQ_SOURCE_DELETED, REQ_TARGET_DELETED |
| Methods inherited from class org.eclipse.gef.tools.AbstractTool |
activate, addFeedback, calculateCursor, commitDrag, createOperationSet, debug, executeCurrentCommand, focusGained, focusLost, getCommandName, getCurrentCommand, getCurrentInput, getCurrentViewer, getDebugName, getDebugNameForState, getDefaultCursor, getDisabledCursor, getDomain, getDragMoveDelta, getLocation, getOperationSet, getStartLocation, getState, handleButtonDown, handleButtonUp, handleDoubleClick, handleDrag, handleDragInProgress, handleDragStarted, handleFinished, handleFocusGained, handleFocusLost, handleHover, handleKeyDown, handleKeyUp, handleMove, handleViewerEntered, isActive, isHoverActive, isInState, keyDown, keyUp, mouseDoubleClick, mouseDown, mouseDrag, mouseHover, mouseMove, mouseUp, movedPastThreshold, reactivate, refreshCursor, releaseToolCapture, removeFeedback, resetFlags, setCurrentCommand, setCursor, setDefaultCursor, setDisabledCursor, setEditDomain, setHoverActive, setStartLocation, setState, setToolCapture, setUnloadWhenFinished, setViewer, stateTransition, unloadWhenFinished, viewerEntered, viewerExited |
| Methods inherited from class org.eclipse.gef.internal.FlagSupport |
getFlag, setFlag |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_FLAG
protected static final int MAX_FLAG
TargetingTool
public TargetingTool()
createTargetRequest
protected Request createTargetRequest()
deactivate
public void deactivate()
- Description copied from class:
AbstractTool
- Deactivates the tool. This method is called whenever the user
switches to another tool. Use this method to do some clean-up
when the tool is switched. The abstract tool allows cursors for
viewers to be changed. When the tool is deactivated it must
revert to normal the cursor of the last tool it changed.
- Overrides:
deactivate in class AbstractTool
- Following copied from class:
org.eclipse.gef.tools.AbstractTool
- See Also:
AbstractTool.activate()
eraseTargetFeedback
protected void eraseTargetFeedback()
- Erase feedback indicating that the viewer object is no longer
the target of a drag.
getCommand
protected Command getCommand()
- Description copied from class:
AbstractTool
- Re-queries the target viewer object for a command
- Overrides:
getCommand in class AbstractTool
getExclusionSet
protected Collection getExclusionSet()
- Returns a List of EditParts that should be excluded from
the possible Targets for this tools operations
Example, when dragging an object, the object should be excluded
to prevent you from dropping the object inside itself.
getTargetEditPart
protected EditPart getTargetEditPart()
getTargetRequest
protected Request getTargetRequest()
handleEnteredEditPart
protected boolean handleEnteredEditPart()
handleExitingEditPart
protected boolean handleExitingEditPart()
handleHoverStop
protected boolean handleHoverStop()
handleInvalidInput
protected boolean handleInvalidInput()
handleLeavingEditPart
protected final void handleLeavingEditPart()
throws Exception
handleViewerExited
protected boolean handleViewerExited()
- Description copied from class:
AbstractTool
- Called when the mouse exits an EditPartViewer.
- Overrides:
handleViewerExited in class AbstractTool
isShowingTargetFeedback
protected boolean isShowingTargetFeedback()
isTargetLocked
protected boolean isTargetLocked()
lockTargetEditPart
protected void lockTargetEditPart(EditPart editpart)
setTargetEditPart
protected void setTargetEditPart(EditPart editpart)
setTargetRequest
protected void setTargetRequest(Request req)
showTargetFeedback
protected void showTargetFeedback()
unlockTargetEditPart
protected void unlockTargetEditPart()
updateTargetRequest
protected void updateTargetRequest()
updateTargetUnderMouse
protected boolean updateTargetUnderMouse()
- Returns true if the target has changed.