org.eclipse.gef.internal.ui.rulers
Class GuideEditPart

java.lang.Object
  extended byorg.eclipse.gef.editparts.AbstractEditPart
      extended byorg.eclipse.gef.editparts.AbstractGraphicalEditPart
          extended byorg.eclipse.gef.internal.ui.rulers.GuideEditPart
All Implemented Interfaces:
EditPart, GraphicalEditPart, org.eclipse.core.runtime.IAdaptable, RequestConstants

public class GuideEditPart
extends AbstractGraphicalEditPart

Since:
3.0

Nested Class Summary
static class GuideEditPart.GuideLineFigure
           
static class GuideEditPart.GuideSelectionPolicy
           
 
Nested classes inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart
AbstractGraphicalEditPart.AccessibleGraphicalEditPart, AbstractGraphicalEditPart.DefaultAccessibleAnchorProvider
 
Nested classes inherited from class org.eclipse.gef.editparts.AbstractEditPart
AbstractEditPart.EditPolicyIterator
 
Field Summary
static int DELETE_THRESHOLD
           
static int MIN_DISTANCE_BW_GUIDES
           
 
Fields inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart
figure, sourceConnections, targetConnections
 
Fields inherited from class org.eclipse.gef.editparts.AbstractEditPart
children, FLAG_ACTIVE, FLAG_FOCUS, MAX_FLAG
 
Fields inherited from interface org.eclipse.gef.EditPart
SELECTED, SELECTED_NONE, SELECTED_PRIMARY
 
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
GuideEditPart(java.lang.Object model)
           
 
Method Summary
 void activate()
          Extends AbstractEditPart#activate() to also activate all source ConnectionEditParts.
protected  void createEditPolicies()
          Creates the initial EditPolicies and/or reserves slots for dynamic ones.
protected  org.eclipse.draw2d.IFigure createFigure()
          Creates the Figure to be used as this part's visuals.
protected  GuideEditPart.GuideLineFigure createGuideLineFigure()
           
 void deactivate()
          Extends AbstractEditPart#deactivate() to also deactivate the source ConnectionEditParts.
protected  AccessibleEditPart getAccessibleEditPart()
          Returns the AccessibleEditPart adapter for this EditPart.
 java.lang.Object getAdapter(java.lang.Class key)
          Extends AbstractEditPart#getAdapter(Class) to handle additional adapter types.
 org.eclipse.swt.graphics.Cursor getCurrentCursor()
           
 DragTracker getDragTracker(Request request)
          Overridden to return a default DragTracker for GraphicalEditParts.
 org.eclipse.draw2d.IFigure getGuideLayer()
           
 org.eclipse.draw2d.IFigure getGuideLineFigure()
           
 RulerEditPart getRulerEditPart()
           
 RulerProvider getRulerProvider()
           
 int getZoomedPosition()
           
 ZoomManager getZoomManager()
           
protected  void handleGuideMoved()
           
protected  void handlePartAttachmentChanged(java.lang.Object part)
           
protected  void handleZoomChanged()
           
 boolean isHorizontal()
           
protected  void refreshVisuals()
          Refreshes this EditPart's visuals.
 void removeNotify()
          Extends AbstractEditPart#removeNotify() to cleanup ConnectionEditParts.
 void setCurrentCursor(org.eclipse.swt.graphics.Cursor c)
           
 void updateLocationOfFigures(int position)
           
 
Methods inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart
addChildVisual, addNodeListener, addNotify, addSourceConnection, addTargetConnection, createConnection, createOrFindConnection, fireRemovingSourceConnection, fireRemovingTargetConnection, fireSourceConnectionAdded, fireTargetConnectionAdded, getContentPane, getFigure, getLayer, getModelSourceConnections, getModelTargetConnections, getSourceConnections, getTargetConnections, primAddSourceConnection, primAddTargetConnection, primRemoveSourceConnection, primRemoveTargetConnection, refresh, refreshSourceConnections, refreshTargetConnections, registerVisuals, removeChildVisual, removeNodeListener, removeSourceConnection, removeTargetConnection, reorderChild, reorderSourceConnection, reorderTargetConnection, setFigure, setLayoutConstraint, unregisterVisuals
 
Methods inherited from class org.eclipse.gef.editparts.AbstractEditPart
activateEditPolicies, addChild, addEditPartListener, createChild, deactivateEditPolicies, debug, debugFeedback, eraseSourceFeedback, eraseTargetFeedback, fireActivated, fireChildAdded, fireDeactivated, fireRemovingChild, fireSelectionChanged, getChildren, getCommand, getEditPolicy, getEditPolicyIterator, getEventListeners, getFlag, getModel, getModelChildren, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, isSelectable, performRequest, refreshChildren, register, registerAccessibility, registerModel, removeChild, removeEditPartListener, removeEditPolicy, setFlag, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, toString, understandsRequest, unregister, unregisterAccessibility, unregisterModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.gef.EditPart
addEditPartListener, eraseSourceFeedback, eraseTargetFeedback, getChildren, getCommand, getEditPolicy, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, isSelectable, performRequest, removeEditPartListener, removeEditPolicy, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest
 

Field Detail

MIN_DISTANCE_BW_GUIDES

public static final int MIN_DISTANCE_BW_GUIDES
See Also:
Constant Field Values

DELETE_THRESHOLD

public static final int DELETE_THRESHOLD
See Also:
Constant Field Values
Constructor Detail

GuideEditPart

public GuideEditPart(java.lang.Object model)
Method Detail

activate

public void activate()
Description copied from class: AbstractGraphicalEditPart
Extends AbstractEditPart.activate() to also activate all source ConnectionEditParts.

Specified by:
activate in interface EditPart
Overrides:
activate in class AbstractGraphicalEditPart
See Also:
EditPart.activate()

createEditPolicies

protected void createEditPolicies()
Description copied from class: AbstractEditPart
Creates the initial EditPolicies and/or reserves slots for dynamic ones. Should be implemented to install the inital EditPolicies based on the model's initial state. null can be used to reserve a "slot", should there be some desire to guarantee the ordering of EditPolcies.

Specified by:
createEditPolicies in class AbstractEditPart
See Also:
EditPart.installEditPolicy(Object, EditPolicy)

createFigure

protected org.eclipse.draw2d.IFigure createFigure()
Description copied from class: AbstractGraphicalEditPart
Creates the Figure to be used as this part's visuals. This is called from AbstractGraphicalEditPart.getFigure() if the figure has not been created.

Specified by:
createFigure in class AbstractGraphicalEditPart
Returns:
a Figure

createGuideLineFigure

protected GuideEditPart.GuideLineFigure createGuideLineFigure()

deactivate

public void deactivate()
Description copied from class: AbstractGraphicalEditPart
Extends AbstractEditPart.deactivate() to also deactivate the source ConnectionEditParts. Subclasses should extend this method to remove any listeners added in AbstractGraphicalEditPart.activate().

Specified by:
deactivate in interface EditPart
Overrides:
deactivate in class AbstractGraphicalEditPart
See Also:
EditPart.deactivate()

getAccessibleEditPart

protected AccessibleEditPart getAccessibleEditPart()
Description copied from class: AbstractEditPart
Returns the AccessibleEditPart adapter for this EditPart. The same adapter instance must be used throughout the editpart's existance. Each adapter has a unique ID which is registered during AbstractEditPart.register(). Accessibility clients can only refer to this editpart via that ID.

Overrides:
getAccessibleEditPart in class AbstractEditPart
Returns:
null or an AccessibleEditPart adapter

getAdapter

public java.lang.Object getAdapter(java.lang.Class key)
Description copied from class: AbstractGraphicalEditPart
Extends AbstractEditPart.getAdapter(Class) to handle additional adapter types. Currently, these types include AccessibleHandleProvider and AccessibleAnchorProvider. Subclasses should extend this method to support additional adapter types, or to replace the default provided adapaters.

Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable
Overrides:
getAdapter in class AbstractGraphicalEditPart
See Also:
IAdaptable.getAdapter(Class)

getCurrentCursor

public org.eclipse.swt.graphics.Cursor getCurrentCursor()

getDragTracker

public DragTracker getDragTracker(Request request)
Description copied from class: AbstractGraphicalEditPart
Overridden to return a default DragTracker for GraphicalEditParts.

Specified by:
getDragTracker in interface EditPart
Overrides:
getDragTracker in class AbstractGraphicalEditPart
See Also:
EditPart.getDragTracker(Request)

getGuideLayer

public org.eclipse.draw2d.IFigure getGuideLayer()

getGuideLineFigure

public org.eclipse.draw2d.IFigure getGuideLineFigure()

getRulerEditPart

public RulerEditPart getRulerEditPart()

getRulerProvider

public RulerProvider getRulerProvider()

getZoomedPosition

public int getZoomedPosition()

getZoomManager

public ZoomManager getZoomManager()

handleGuideMoved

protected void handleGuideMoved()

handlePartAttachmentChanged

protected void handlePartAttachmentChanged(java.lang.Object part)

handleZoomChanged

protected void handleZoomChanged()

isHorizontal

public boolean isHorizontal()

refreshVisuals

protected void refreshVisuals()
Description copied from class: AbstractEditPart
Refreshes this EditPart's visuals. This method is called by AbstractEditPart.refresh(), and may also be called in response to notifications from the model. This method does nothing by default. Subclasses may override.

Overrides:
refreshVisuals in class AbstractEditPart

removeNotify

public void removeNotify()
Description copied from class: AbstractGraphicalEditPart
Extends AbstractEditPart.removeNotify() to cleanup ConnectionEditParts.

Specified by:
removeNotify in interface EditPart
Overrides:
removeNotify in class AbstractGraphicalEditPart
See Also:
AbstractGraphicalEditPart.removeNotify()

setCurrentCursor

public void setCurrentCursor(org.eclipse.swt.graphics.Cursor c)

updateLocationOfFigures

public void updateLocationOfFigures(int position)