sk.uniba.euromath.editor.xmlEditor.tools
Class XMLStructureDragTracker

java.lang.Object
  extended by org.eclipse.gef.util.FlagSupport
      extended by org.eclipse.gef.tools.AbstractTool
          extended by org.eclipse.gef.tools.TargetingTool
              extended by org.eclipse.gef.tools.SelectEditPartTracker
                  extended by org.eclipse.gef.tools.DragEditPartsTracker
                      extended by sk.uniba.euromath.editor.xmlEditor.tools.XMLStructureDragTracker
All Implemented Interfaces:
org.eclipse.gef.DragTracker, org.eclipse.gef.RequestConstants, org.eclipse.gef.Tool

public class XMLStructureDragTracker
extends org.eclipse.gef.tools.DragEditPartsTracker

Drag tracker handling start-point end-point drags to select all nodes in document interval created for nodes of start, end editpart. Preview selection is showed all time of drag and at end of drag is commited to viewer as final.

Author:
Martin Kollar 23.09.2005

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.DragEditPartsTracker
MAX_FLAG
 
Fields inherited from class org.eclipse.gef.tools.SelectEditPartTracker
FLAG_SELECTION_PERFORMED
 
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(XMLEditPart sourceEditPart)
          Constructs new XMLDragTracker with the given XMLEditPart
 
Method Summary
protected  org.eclipse.gef.Request createTargetRequest()
          For selecting is not needed any request, so leave default implementation to avoid over implementing and errors.
protected  XMLAccess getXMLAccess()
           
protected  IXMLGraphicalViewer getXMLGraphicalViewer()
           
protected  boolean handleButtonDown(int button)
           
protected  boolean handleDragInProgress()
           
protected  boolean handleEnteredEditPart()
           
protected  boolean handleExitingEditPart()
           
protected  void performSelection()
           
protected  void prepareSelection()
          Prepares selection object to show or perform.
 
Methods inherited from class org.eclipse.gef.tools.DragEditPartsTracker
commitDrag, createOperationSet, deactivate, eraseSourceFeedback, getCommand, getCommandName, getDebugName, getDefaultCursor, getExclusionSet, handleAutoexpose, handleButtonUp, handleHover, handleInvalidInput, handleKeyDown, handleKeyUp, isCloneActive, isMove, performDrag, repairStartLocation, setAutoexposeHelper, setCloneActive, setState, setTargetEditPart, showSourceFeedback, updateTargetRequest
 
Methods inherited from class org.eclipse.gef.tools.SelectEditPartTracker
calculateCursor, getSourceEditPart, handleDoubleClick, handleDragStarted, hasSelectionOccurred, performConditionalSelection, performDirectEdit, performOpen, resetFlags, setSourceEditPart
 
Methods inherited from class org.eclipse.gef.tools.TargetingTool
doAutoexpose, eraseTargetFeedback, getTargetEditPart, getTargetingConditional, getTargetRequest, handleHoverStop, handleLeavingEditPart, handleViewerExited, isShowingTargetFeedback, isTargetLocked, lockTargetEditPart, setTargetRequest, showTargetFeedback, unlockTargetEditPart, updateAutoexposeHelper, updateTargetUnderMouse
 
Methods inherited from class org.eclipse.gef.tools.AbstractTool
activate, addFeedback, applyProperty, debug, executeCommand, executeCurrentCommand, focusGained, focusLost, getCurrentCommand, getCurrentInput, getCurrentViewer, getDebugNameForState, getDisabledCursor, getDomain, getDragMoveDelta, getLocation, getOperationSet, getStartLocation, getState, handleCommandStackChanged, handleDrag, handleFinished, handleFocusGained, handleFocusLost, 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, setToolCapture, setUnloadWhenFinished, setViewer, 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.Tool
activate, focusGained, focusLost, keyDown, keyTraversed, keyUp, mouseDoubleClick, mouseDown, mouseDrag, mouseHover, mouseMove, mouseUp, mouseWheelScrolled, nativeDragFinished, nativeDragStarted, setEditDomain, setProperties, setViewer, viewerEntered, viewerExited
 

Constructor Detail

XMLStructureDragTracker

public XMLStructureDragTracker(XMLEditPart sourceEditPart)
Constructs new XMLDragTracker with the given XMLEditPart

Parameters:
sourceEditPart - source editPart where selection starts
Method Detail

getXMLAccess

protected XMLAccess getXMLAccess()

getXMLGraphicalViewer

protected IXMLGraphicalViewer getXMLGraphicalViewer()

createTargetRequest

protected org.eclipse.gef.Request createTargetRequest()
For selecting is not needed any request, so leave default implementation to avoid over implementing and errors.

Overrides:
createTargetRequest in class org.eclipse.gef.tools.DragEditPartsTracker

handleDragInProgress

protected boolean handleDragInProgress()
Overrides:
handleDragInProgress in class org.eclipse.gef.tools.DragEditPartsTracker

handleExitingEditPart

protected boolean handleExitingEditPart()
Overrides:
handleExitingEditPart in class org.eclipse.gef.tools.TargetingTool

handleEnteredEditPart

protected boolean handleEnteredEditPart()
Overrides:
handleEnteredEditPart in class org.eclipse.gef.tools.TargetingTool

handleButtonDown

protected boolean handleButtonDown(int button)
Overrides:
handleButtonDown in class org.eclipse.gef.tools.SelectEditPartTracker

prepareSelection

protected void prepareSelection()
Prepares selection object to show or perform. Selection object is made current for state of this drag tracker after method execution.


performSelection

protected void performSelection()
Overrides:
performSelection in class org.eclipse.gef.tools.SelectEditPartTracker


Copyright © 2003-2006 null. All Rights Reserved.