|
Eclipse GEF 3.0.1 |
||||||||||
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.eclipse.gef.tools.TargetingTool
org.eclipse.gef.tools.SelectionTool
org.eclipse.gef.tools.PanningSelectionTool
A subclass of the SelectionTool that allows panning by holding down the space bar.
Nested Class Summary |
Nested classes inherited from class org.eclipse.gef.tools.AbstractTool |
AbstractTool.Input |
Field Summary | |
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. |
Fields inherited from class org.eclipse.gef.tools.SelectionTool |
MAX_FLAG, 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_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 | |
PanningSelectionTool()
|
Method Summary | |
protected boolean |
acceptSpaceBar(KeyEvent e)
Returns true if the space bar can be accepted. |
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 Cursor |
getDefaultCursor()
Returns the cursor used under normal conditions. |
boolean |
handleButtonDown(int which)
If there is a Handle under the mouse, this method sets the drag tracker
returned from the handle. |
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. |
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 PAN
protected static final int PAN_IN_PROGRESS
protected static final int MAX_STATE
Constructor Detail |
public PanningSelectionTool()
Method Detail |
protected boolean acceptSpaceBar(KeyEvent e)
e
- the key event
protected String getDebugName()
AbstractTool
getDebugName
in class SelectionTool
AbstractTool.getDebugName()
protected String getDebugNameForState(int state)
AbstractTool
getDebugNameForState
in class SelectionTool
AbstractTool.getDebugNameForState(int)
protected Cursor getDefaultCursor()
getDefaultCursor
in class AbstractTool
AbstractTool.setDefaultCursor(Cursor)
public boolean handleButtonDown(int which)
SelectionTool
Handle
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 SelectionTool
SelectionTool.handleButtonDown(int)
public boolean handleButtonUp(int which)
SelectionTool
handleButtonUp
in class SelectionTool
SelectionTool.handleButtonUp(int)
protected boolean handleDrag()
AbstractTool
AbstractTool.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 AbstractTool
true
if the drag is handledAbstractTool.handleDrag()
protected boolean handleFocusLost()
SelectionTool
null
and goes into the initial state when focus
is lost.
handleFocusLost
in class SelectionTool
SelectionTool.handleFocusLost()
protected boolean handleKeyDown(KeyEvent e)
SelectionTool
KeyHandler
, it calls KeyHandler.keyPressed(KeyEvent)
.
handleKeyDown
in class SelectionTool
SelectionTool.handleKeyDown(org.eclipse.swt.events.KeyEvent)
protected boolean handleKeyUp(KeyEvent e)
SelectionTool
KeyHandler
, calls
KeyHandler.keyReleased(KeyEvent)
sending it the given key event.
handleKeyUp
in class SelectionTool
SelectionTool.handleKeyUp(org.eclipse.swt.events.KeyEvent)
|
Eclipse GEF 3.0.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |