public class ShapeEditPart extends GraphitiShapeEditPart implements IShapeEditPart, org.eclipse.gef.NodeEditPart
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 and Description |
---|
ShapeEditPart(IConfigurationProviderInternal configurationProvider,
Shape shape)
Creates a new ShapeEditPart.
|
Modifier and Type | Method and Description |
---|---|
void |
activate() |
void |
deactivate() |
void |
delayDirectEditing() |
void |
deleteChildAndRefresh(org.eclipse.gef.EditPart childEditPart)
Delete child and refresh.
|
java.lang.Object |
getAdapter(java.lang.Class key) |
IConfigurationProviderInternal |
getConfigurationProvider()
Gets the configuration provider.
|
org.eclipse.gef.DragTracker |
getDragTracker(org.eclipse.gef.Request request) |
IFeatureProvider |
getFeatureProvider()
Gets the feature provider.
|
java.util.List<PictogramElement> |
getModelChildren()
Gets the model children.
|
java.util.List<Connection> |
getModelSourceConnections()
Returns the source-connections of this EditPart.
|
java.util.List<Connection> |
getModelTargetConnections()
Returns the target-connections of this EditPart.
|
PictogramElement |
getPictogramElement()
Returns the
PictogramElement (the model object) that this
EditPart represents. |
IPictogramElementDelegate |
getPictogramElementDelegate()
Gets the pictogram element delegate.
|
org.eclipse.gef.RootEditPart |
getRoot()
this is just a fix getParent sometimes returns null - seems to be an
update problem.
|
org.eclipse.draw2d.ConnectionAnchor |
getSourceConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection)
Returns the ConnectionAnchor, which is to be displayed at the source-side
of an existing connection.
|
org.eclipse.draw2d.ConnectionAnchor |
getSourceConnectionAnchor(org.eclipse.gef.Request request)
Returns the ConnectionAnchor, which is to be displayed at the source-side
when creating a new connection.
|
org.eclipse.draw2d.ConnectionAnchor |
getTargetConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection)
Returns the ConnectionAnchor, which is to be displayed at the
_target-side of an existing connection.
|
org.eclipse.draw2d.ConnectionAnchor |
getTargetConnectionAnchor(org.eclipse.gef.Request request)
Returns the ConnectionAnchor, which is to be displayed at the
_target-side when creating a new connection.
|
org.eclipse.gef.EditPart |
getTargetEditPart(org.eclipse.gef.Request request) |
boolean |
isSelectable() |
void |
performRequest(org.eclipse.gef.Request request)
This method tries to perform a direct-editing with the given request (see
getLabels()).
|
void |
refresh() |
void |
refreshDecorators() |
void |
showSourceFeedback(org.eclipse.gef.Request request) |
void |
switchToDirectEditingMode(PictogramElement pictogramElement,
GraphicsAlgorithm graphicsAlgorithm)
Switch to direct editing mode.
|
java.lang.String |
toString() |
addNodeListener, addNotify, getContentPane, getFigure, getSourceConnections, getTargetConnections, removeNodeListener, removeNotify, setLayoutConstraint
addEditPartListener, eraseSourceFeedback, eraseTargetFeedback, getChildren, getCommand, getEditPolicy, getModel, getParent, getSelected, getViewer, hasFocus, installEditPolicy, isActive, removeEditPartListener, removeEditPolicy, setFocus, setModel, setParent, setSelected, showTargetFeedback, understandsRequest
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addNodeListener, getContentPane, getFigure, getSourceConnections, getTargetConnections, removeNodeListener, setLayoutConstraint
addEditPartListener, addNotify, eraseSourceFeedback, eraseTargetFeedback, getChildren, getCommand, getEditPolicy, getModel, getParent, getSelected, getViewer, hasFocus, installEditPolicy, isActive, removeEditPartListener, removeEditPolicy, removeNotify, setFocus, setModel, setParent, setSelected, showTargetFeedback, understandsRequest
public ShapeEditPart(IConfigurationProviderInternal configurationProvider, Shape shape)
configurationProvider
- the configuration providershape
- the shapepublic void activate()
activate
in interface org.eclipse.gef.EditPart
activate
in class org.eclipse.gef.editparts.AbstractGraphicalEditPart
public void deactivate()
deactivate
in interface org.eclipse.gef.EditPart
deactivate
in class org.eclipse.gef.editparts.AbstractGraphicalEditPart
public void deleteChildAndRefresh(org.eclipse.gef.EditPart childEditPart)
IShapeEditPart
deleteChildAndRefresh
in interface IShapeEditPart
childEditPart
- the child edit partpublic java.lang.Object getAdapter(java.lang.Class key)
getAdapter
in interface IAdaptable
getAdapter
in class org.eclipse.gef.editparts.AbstractGraphicalEditPart
public IConfigurationProviderInternal getConfigurationProvider()
getConfigurationProvider
in interface IConfigurationProviderHolder
public org.eclipse.gef.DragTracker getDragTracker(org.eclipse.gef.Request request)
getDragTracker
in interface org.eclipse.gef.EditPart
getDragTracker
in class org.eclipse.gef.editparts.AbstractGraphicalEditPart
public java.util.List<PictogramElement> getModelChildren()
IPictogramElementEditPart
getModelChildren
in interface IPictogramElementEditPart
getModelChildren
in class org.eclipse.gef.editparts.AbstractEditPart
public java.util.List<Connection> getModelSourceConnections()
getModelSourceConnections
in interface IPictogramElementEditPart
getModelSourceConnections
in class org.eclipse.gef.editparts.AbstractGraphicalEditPart
AbstractGraphicalEditPart.getModelSourceConnections()
public java.util.List<Connection> getModelTargetConnections()
getModelTargetConnections
in interface IPictogramElementEditPart
getModelTargetConnections
in class org.eclipse.gef.editparts.AbstractGraphicalEditPart
AbstractGraphicalEditPart.getModelTargetConnections()
public PictogramElement getPictogramElement()
GraphitiShapeEditPart
PictogramElement
(the model object) that this
EditPart
represents.getPictogramElement
in interface IPictogramElementEditPart
getPictogramElement
in class GraphitiShapeEditPart
PictogramElement
public org.eclipse.gef.RootEditPart getRoot()
getRoot
in interface org.eclipse.gef.EditPart
getRoot
in class org.eclipse.gef.editparts.AbstractEditPart
public org.eclipse.draw2d.ConnectionAnchor getSourceConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection)
getSourceConnectionAnchor
in interface org.eclipse.gef.NodeEditPart
connection
- the connectionNodeEditPart.getSourceConnectionAnchor(ConnectionEditPart)
public org.eclipse.draw2d.ConnectionAnchor getSourceConnectionAnchor(org.eclipse.gef.Request request)
getSourceConnectionAnchor
in interface org.eclipse.gef.NodeEditPart
request
- the requestNodeEditPart.getSourceConnectionAnchor(Request)
public org.eclipse.draw2d.ConnectionAnchor getTargetConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection)
getTargetConnectionAnchor
in interface org.eclipse.gef.NodeEditPart
connection
- the connectionNodeEditPart.getTargetConnectionAnchor(ConnectionEditPart)
public org.eclipse.draw2d.ConnectionAnchor getTargetConnectionAnchor(org.eclipse.gef.Request request)
getTargetConnectionAnchor
in interface org.eclipse.gef.NodeEditPart
request
- the requestNodeEditPart.getTargetConnectionAnchor(Request)
public boolean isSelectable()
isSelectable
in interface org.eclipse.gef.EditPart
isSelectable
in class org.eclipse.gef.editparts.AbstractGraphicalEditPart
public void performRequest(org.eclipse.gef.Request request)
performRequest
in interface org.eclipse.gef.EditPart
performRequest
in class org.eclipse.gef.editparts.AbstractEditPart
request
- the requestEditPart.performRequest(Request)
public void refresh()
refresh
in interface org.eclipse.gef.EditPart
refresh
in class org.eclipse.gef.editparts.AbstractGraphicalEditPart
public void switchToDirectEditingMode(PictogramElement pictogramElement, GraphicsAlgorithm graphicsAlgorithm)
pictogramElement
- the pictogram elementgraphicsAlgorithm
- the graphics algorithmpublic org.eclipse.gef.EditPart getTargetEditPart(org.eclipse.gef.Request request)
getTargetEditPart
in interface org.eclipse.gef.EditPart
getTargetEditPart
in class org.eclipse.gef.editparts.AbstractEditPart
public void showSourceFeedback(org.eclipse.gef.Request request)
showSourceFeedback
in interface org.eclipse.gef.EditPart
showSourceFeedback
in class org.eclipse.gef.editparts.AbstractEditPart
public IFeatureProvider getFeatureProvider()
IFeatureProviderHolder
getFeatureProvider
in interface IFeatureProviderHolder
public IPictogramElementDelegate getPictogramElementDelegate()
IPictogramElementEditPart
getPictogramElementDelegate
in interface IPictogramElementEditPart
public java.lang.String toString()
toString
in class org.eclipse.gef.editparts.AbstractEditPart
public void refreshDecorators()
refreshDecorators
in interface IAnchorContainerEditPart
public void delayDirectEditing()