public class PanningSelectionTool extends SelectionTool
AbstractTool.Input| Modifier and Type | Field and Description |
|---|---|
protected static int |
MAX_STATE
Max state
|
protected static int |
PAN
The state to indicate that the space bar has been pressed but no drag has
been initiated.
|
protected static int |
PAN_IN_PROGRESS
The state to indicate that a pan is in progress.
|
MAX_FLAG, STATE_TRAVERSE_HANDLEMOUSE_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_TERMINALREQ_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 |
|---|
PanningSelectionTool() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
acceptSpaceBar(KeyEvent e)
Returns
true if spacebar condition was accepted. |
protected java.lang.String |
getDebugName()
Returns the debug name for this tool.
|
protected java.lang.String |
getDebugNameForState(int state)
Returns a String representation of the given state for debug purposes.
|
protected Cursor |
getDefaultCursor()
Returns the cursor used under normal conditions.
|
protected boolean |
handleButtonDown(int which)
If there is a
Handle under the mouse, this method sets the drag
tracker returned from the handle. |
protected boolean |
handleButtonUp(int which)
Resets this tool when the last button is released.
|
protected boolean |
handleDrag()
Called whenever the mouse is being dragged.
|
protected boolean |
handleFocusLost()
Sets the drag tracker to
null and goes into the initial
state when focus is lost. |
protected boolean |
handleKeyDown(KeyEvent e)
Processes key down events.
|
protected boolean |
handleKeyUp(KeyEvent e)
If in the initial state and the viewer has a
KeyHandler, calls
KeyHandler.keyReleased(KeyEvent) sending it the given key event. |
createHoverRequest, createTargetRequest, deactivate, eraseHoverFeedback, getCommandName, getDragTracker, getTargetHoverRequest, getTargetingConditional, handleCommandStackChanged, handleHover, handleHoverStop, handleMove, handleNativeDragFinished, handleNativeDragStarted, handleViewerExited, keyDown, keyUp, mouseDoubleClick, mouseDown, mouseDrag, mouseHover, mouseMove, mouseUp, mouseWheelScrolled, refreshCursor, setDragTracker, showHoverFeedback, updateHoverRequest, updateTargetRequestdoAutoexpose, eraseTargetFeedback, getAutoexposeHelper, getCommand, getExclusionSet, getTargetEditPart, getTargetRequest, handleAutoexpose, handleEnteredEditPart, handleExitingEditPart, handleInvalidInput, handleLeavingEditPart, isShowingTargetFeedback, isTargetLocked, lockTargetEditPart, resetFlags, resetHover, setAutoexposeHelper, setTargetEditPart, setTargetRequest, showTargetFeedback, unlockTargetEditPart, updateAutoexposeHelper, updateTargetUnderMouseacceptArrowKey, activate, addFeedback, applyProperty, calculateCursor, commitDrag, createOperationSet, debug, executeCommand, executeCurrentCommand, focusGained, focusLost, getCurrentCommand, getCurrentInput, getCurrentViewer, getDisabledCursor, getDomain, getDragMoveDelta, getLocation, getOperationSet, getStartLocation, getState, handleDoubleClick, handleDragInProgress, handleDragStarted, handleFinished, handleFocusGained, handleKeyTraversed, handleViewerEntered, isActive, isHoverActive, isInState, isViewerImportant, keyTraversed, movedPastThreshold, nativeDragFinished, nativeDragStarted, performViewerMouseWheel, placeMouseInViewer, reactivate, releaseToolCapture, removeFeedback, setCurrentCommand, setCursor, setDefaultCursor, setDisabledCursor, setEditDomain, setHoverActive, setProperties, setStartLocation, setState, setToolCapture, setUnloadWhenFinished, setViewer, stateTransition, unloadWhenFinished, viewerEntered, viewerExitedgetFlag, setFlagprotected static final int PAN
protected static final int PAN_IN_PROGRESS
protected static final int MAX_STATE
protected boolean acceptSpaceBar(KeyEvent e)
true if spacebar condition was accepted.e - the key eventprotected java.lang.String getDebugName()
AbstractToolgetDebugName in class SelectionToolAbstractTool.getDebugName()protected java.lang.String getDebugNameForState(int state)
AbstractToolgetDebugNameForState in class SelectionToolstate - the stateAbstractTool.getDebugNameForState(int)protected Cursor getDefaultCursor()
getDefaultCursor in class AbstractToolAbstractTool.setDefaultCursor(Cursor)protected boolean handleButtonDown(int which)
SelectionToolHandle under the mouse, this method sets the drag
tracker returned from the handle. If there's an EditPart under
the mouse, this method sets the drag tracker returned from the edit part.handleButtonDown in class SelectionToolwhich - which button went downtrue if the buttonDown was handledSelectionTool.handleButtonDown(int)protected boolean handleButtonUp(int which)
SelectionToolhandleButtonUp in class SelectionToolwhich - the button being releasedtrue if the button up was handledSelectionTool.handleButtonUp(int)protected boolean handleDrag()
AbstractToolAbstractTool.handleDragInProgress() starts getting called.
By default, nothing happens, and false is returned.
Subclasses may override this method to interpret a drag. Returning
true indicates that the drag was handled in some way.handleDrag in class AbstractTooltrue if the drag is handledAbstractTool.handleDrag()protected boolean handleFocusLost()
SelectionToolnull and goes into the initial
state when focus is lost.handleFocusLost in class SelectionTooltrue if the event was handledSelectionTool.handleFocusLost()protected boolean handleKeyDown(KeyEvent e)
SelectionToolKeyHandler, it calls
KeyHandler.keyPressed(KeyEvent).handleKeyDown in class SelectionToole - the key eventtrue if the key down was handled.SelectionTool.handleKeyDown(org.eclipse.swt.events.KeyEvent)protected boolean handleKeyUp(KeyEvent e)
SelectionToolKeyHandler, calls
KeyHandler.keyReleased(KeyEvent) sending it the given key event.handleKeyUp in class SelectionToole - the key eventtrue if the event was handledSelectionTool.handleKeyUp(org.eclipse.swt.events.KeyEvent)Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.