Class PictogramElementDelegate
java.lang.Object
org.eclipse.graphiti.ui.internal.parts.PictogramElementDelegate
- All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable
,IFeatureProviderHolder
,IVisualStateHolder
,IPictogramElementDelegate
- Direct Known Subclasses:
AnchorContainerDelegate
A class, which contains helper-methods, which are necessary to implement the
interface IAnchorContainerEditPart. It is not possible to make this an
EditPart itself, because of different inheritance-hierarchies used in the
sub-classes.
-
Constructor Summary
ConstructorDescriptionPictogramElementDelegate
(IConfigurationProviderInternal configurationProvider, PictogramElement pictogramElement, org.eclipse.gef.EditPart containerEditPart) Creates a new PictogramElementDelegate. -
Method Summary
Modifier and TypeMethodDescriptionvoid
activate()
Activate.protected void
addDecorators
(GraphicsAlgorithm graphicsAlgorithm, PictogramElement pe, org.eclipse.draw2d.IFigure figure, IToolBehaviorProvider toolBehaviorProvider) org.eclipse.draw2d.IFigure
Creates the figure.void
Deactivate.getAdapter
(Class key) Gets the configuration provider.protected org.eclipse.gef.EditPart
Gets the edit part which holds the instance of this delegate.Gets the feature provider.org.eclipse.draw2d.IFigure
getFigureForGraphicsAlgorithm
(GraphicsAlgorithm graphicsAlgorithm) Gets the figure for graphics algorithm.List<org.eclipse.draw2d.IFigure>
Gets the pictogram element.protected GFPreferences
Returns the visual state of this shape.protected boolean
boolean
isValid()
void
void
refreshEditPartsForModelChildrenAndSourceConnections
(org.eclipse.gef.EditPart ep) refresh edit parts for child pictogram elements.void
Refresh figure for edit part.protected void
setContainerEditPart
(org.eclipse.gef.EditPart containerEditPart) Sets the edit part which holds the instance of this delegate.void
setForceRefresh
(boolean forceRefresh) If set to true, the visual refresh (synchronization of figures and graphics algorithm) will be done even it is not necessary.protected void
setValid
(boolean valid)
-
Constructor Details
-
PictogramElementDelegate
public PictogramElementDelegate(IConfigurationProviderInternal configurationProvider, PictogramElement pictogramElement, org.eclipse.gef.EditPart containerEditPart) Creates a new PictogramElementDelegate.- Parameters:
configurationProvider
- the configuration providerpictogramElement
- the pictogram elementcontainerEditPart
- the container edit part
-
-
Method Details
-
activate
public void activate()Description copied from interface:IPictogramElementDelegate
Activate.- Specified by:
activate
in interfaceIPictogramElementDelegate
-
createFigure
public org.eclipse.draw2d.IFigure createFigure()Description copied from interface:IPictogramElementDelegate
Creates the figure.- Specified by:
createFigure
in interfaceIPictogramElementDelegate
- Returns:
- the i figure
-
deactivate
public void deactivate()Description copied from interface:IPictogramElementDelegate
Deactivate.- Specified by:
deactivate
in interfaceIPictogramElementDelegate
-
getAdapter
- Specified by:
getAdapter
in interfaceorg.eclipse.core.runtime.IAdaptable
-
getConfigurationProvider
Gets the configuration provider.- Specified by:
getConfigurationProvider
in interfaceIPictogramElementDelegate
- Returns:
- Returns the configurationProvider.
-
getFigureForGraphicsAlgorithm
public org.eclipse.draw2d.IFigure getFigureForGraphicsAlgorithm(GraphicsAlgorithm graphicsAlgorithm) Description copied from interface:IPictogramElementDelegate
Gets the figure for graphics algorithm.- Specified by:
getFigureForGraphicsAlgorithm
in interfaceIPictogramElementDelegate
- Parameters:
graphicsAlgorithm
- the graphics algorithm- Returns:
- the figure for graphics algorithm
-
getPictogramElement
Description copied from interface:IPictogramElementDelegate
Gets the pictogram element.- Specified by:
getPictogramElement
in interfaceIPictogramElementDelegate
- Returns:
- the pictogram element
-
refreshEditPartsForModelChildrenAndSourceConnections
public void refreshEditPartsForModelChildrenAndSourceConnections(org.eclipse.gef.EditPart ep) refresh edit parts for child pictogram elements.- Specified by:
refreshEditPartsForModelChildrenAndSourceConnections
in interfaceIPictogramElementDelegate
- Parameters:
ep
- the ep
-
refreshFigureForEditPart
public void refreshFigureForEditPart()Description copied from interface:IPictogramElementDelegate
Refresh figure for edit part.- Specified by:
refreshFigureForEditPart
in interfaceIPictogramElementDelegate
-
getContainerEditPart
protected org.eclipse.gef.EditPart getContainerEditPart()Gets the edit part which holds the instance of this delegate.- Returns:
- the container edit part
-
setContainerEditPart
protected void setContainerEditPart(org.eclipse.gef.EditPart containerEditPart) Sets the edit part which holds the instance of this delegate.- Parameters:
containerEditPart
- the new container edit part
-
getFeatureProvider
Description copied from interface:IFeatureProviderHolder
Gets the feature provider.- Specified by:
getFeatureProvider
in interfaceIFeatureProviderHolder
- Returns:
- the feature provider
-
setForceRefresh
public void setForceRefresh(boolean forceRefresh) Description copied from interface:IPictogramElementDelegate
If set to true, the visual refresh (synchronization of figures and graphics algorithm) will be done even it is not necessary.- Specified by:
setForceRefresh
in interfaceIPictogramElementDelegate
-
isForceRefresh
protected boolean isForceRefresh() -
addDecorators
protected void addDecorators(GraphicsAlgorithm graphicsAlgorithm, PictogramElement pe, org.eclipse.draw2d.IFigure figure, IToolBehaviorProvider toolBehaviorProvider) -
isValid
public boolean isValid()- Specified by:
isValid
in interfaceIPictogramElementDelegate
- Returns:
- true, if edit part (and it's delegate) are still valid (alive)
-
setValid
protected void setValid(boolean valid) -
getVisualState
Returns the visual state of this shape.- Specified by:
getVisualState
in interfaceIVisualStateHolder
- Returns:
- The visual state of this shape.
-
getMainFiguresFromChildEditparts
- Specified by:
getMainFiguresFromChildEditparts
in interfaceIPictogramElementDelegate
-
getPreferences
-
refreshDecorators
public void refreshDecorators()- Specified by:
refreshDecorators
in interfaceIPictogramElementDelegate
-