|
||||||||||
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 sk.uniba.euromath.editor.xmlEditor.tools.XMLStructureDragTracker
public class XMLStructureDragTracker
Drag tracker handling drags interpreting them as selections. Local selection
is created translating start-point end-point to DOMPointers making
DOMInterval. Depending on input is local selection combined with viewer's
selection.
Start(end) point translation is always to DOMPinters pointing between nodes,
not into.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.gef.tools.AbstractTool |
---|
org.eclipse.gef.tools.AbstractTool.Input |
Field Summary |
---|
Fields inherited from class org.eclipse.gef.tools.TargetingTool |
---|
MAX_FLAG |
Fields inherited from class org.eclipse.gef.tools.AbstractTool |
---|
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 | |
---|---|
XMLStructureDragTracker(IXMLEditPart sourceEditPart)
Constructs new XMLDragTracker with the given XMLEditPart |
Method Summary | |
---|---|
protected DOMIntervalSet |
computeGlobalSelection()
Computes actual selection to set to viewer. |
protected DOMIntervalSet |
computeLocalSelection()
Computes local selection corresponding to drag. |
protected boolean |
evaluate(org.eclipse.gef.EditPart editpart)
Test editpart, if is acceptable as end point of selection under mouse. |
protected void |
finishDrag()
Is called at termination of drag to perfom and finish selection and drag related tasks. |
protected String |
getCommandName()
|
protected org.eclipse.gef.EditPart |
getSourceEditPart()
|
protected XMLAccess |
getXMLAccess()
|
protected IXMLGraphicalViewer |
getXMLGraphicalViewer()
|
protected boolean |
handleButtonDown(int button)
|
protected boolean |
handleButtonUp(int button)
If in the drag state, the tool selects the source edit part. |
protected boolean |
handleDrag()
|
protected boolean |
handleDragInProgress()
|
protected boolean |
handleDragStarted()
|
protected boolean |
handleEnteredEditPart()
|
protected boolean |
handleExitingEditPart()
|
protected boolean |
handleKeyDown(KeyEvent e)
|
protected boolean |
handleKeyUp(KeyEvent e)
|
void |
setViewer(org.eclipse.gef.EditPartViewer viewer)
Retreives selection from viewer, before drag started. |
protected boolean |
updateTargetUnderMouse()
Simpler implementation than super, as target is directly taken editpart at mouse cursor location, which must be XMLEditPart with not null element id. |
Methods inherited from class org.eclipse.gef.tools.TargetingTool |
---|
createTargetRequest, deactivate, doAutoexpose, eraseTargetFeedback, getCommand, getExclusionSet, getTargetEditPart, getTargetingConditional, getTargetRequest, handleAutoexpose, handleHoverStop, handleInvalidInput, handleLeavingEditPart, handleViewerExited, isShowingTargetFeedback, isTargetLocked, lockTargetEditPart, resetFlags, setAutoexposeHelper, setTargetEditPart, setTargetRequest, showTargetFeedback, unlockTargetEditPart, updateAutoexposeHelper, updateTargetRequest |
Methods inherited from class org.eclipse.gef.tools.AbstractTool |
---|
activate, addFeedback, applyProperty, calculateCursor, commitDrag, createOperationSet, debug, executeCommand, executeCurrentCommand, focusGained, focusLost, getCurrentCommand, getCurrentInput, getCurrentViewer, getDebugName, getDebugNameForState, getDefaultCursor, getDisabledCursor, getDomain, getDragMoveDelta, getLocation, getOperationSet, getStartLocation, getState, handleCommandStackChanged, handleDoubleClick, handleFinished, handleFocusGained, handleFocusLost, handleHover, handleKeyTraversed, handleMove, handleNativeDragFinished, handleNativeDragStarted, handleViewerEntered, isActive, isHoverActive, isInState, isViewerImportant, keyDown, keyTraversed, keyUp, mouseDoubleClick, mouseDown, mouseDrag, mouseHover, mouseMove, mouseUp, mouseWheelScrolled, movedPastThreshold, nativeDragFinished, nativeDragStarted, performViewerMouseWheel, reactivate, refreshCursor, releaseToolCapture, removeFeedback, 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, deactivate, focusGained, focusLost, keyDown, keyTraversed, keyUp, mouseDoubleClick, mouseDown, mouseDrag, mouseHover, mouseMove, mouseUp, mouseWheelScrolled, nativeDragFinished, nativeDragStarted, setEditDomain, setProperties, viewerEntered, viewerExited |
Constructor Detail |
---|
public XMLStructureDragTracker(IXMLEditPart sourceEditPart)
sourceEditPart
- source editPart where selection startsMethod Detail |
---|
public void setViewer(org.eclipse.gef.EditPartViewer viewer)
setViewer
in interface org.eclipse.gef.Tool
setViewer
in class org.eclipse.gef.tools.AbstractTool
protected boolean handleDragStarted()
handleDragStarted
in class org.eclipse.gef.tools.AbstractTool
protected boolean handleDrag()
handleDrag
in class org.eclipse.gef.tools.AbstractTool
protected boolean handleDragInProgress()
handleDragInProgress
in class org.eclipse.gef.tools.AbstractTool
protected boolean handleExitingEditPart()
handleExitingEditPart
in class org.eclipse.gef.tools.TargetingTool
protected boolean handleEnteredEditPart()
handleEnteredEditPart
in class org.eclipse.gef.tools.TargetingTool
protected boolean handleButtonDown(int button)
handleButtonDown
in class org.eclipse.gef.tools.AbstractTool
protected DOMIntervalSet computeLocalSelection()
protected boolean handleButtonUp(int button)
#performDirectEdit()
is
called. If the edit part is newly selected and not completely
visible, EditPartViewer.reveal(EditPart)
is called to show
the selected edit part.
handleButtonUp
in class org.eclipse.gef.tools.AbstractTool
AbstractTool.handleButtonUp(int)
protected DOMIntervalSet computeGlobalSelection()
protected XMLAccess getXMLAccess()
protected IXMLGraphicalViewer getXMLGraphicalViewer()
protected String getCommandName()
getCommandName
in class org.eclipse.gef.tools.AbstractTool
protected org.eclipse.gef.EditPart getSourceEditPart()
protected boolean updateTargetUnderMouse()
updateTargetUnderMouse
in class org.eclipse.gef.tools.TargetingTool
protected boolean evaluate(org.eclipse.gef.EditPart editpart)
editpart
- to test for potential target - end point of selection
protected void finishDrag()
protected boolean handleKeyDown(KeyEvent e)
handleKeyDown
in class org.eclipse.gef.tools.AbstractTool
protected boolean handleKeyUp(KeyEvent e)
handleKeyUp
in class org.eclipse.gef.tools.AbstractTool
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |