org.eclipse.graphiti.ui.internal.parts

## Class PictogramElementDelegate

- java.lang.Object
- - org.eclipse.graphiti.ui.internal.parts.PictogramElementDelegate

All Implemented Interfaces:
  IAdaptable, IFeatureProviderHolder, IVisualStateHolder, IPictogramElementDelegate

Direct Known Subclasses:
  AnchorContainerDelegate

    public class PictogramElementDelegate
    extends java.lang.Object
    implements IPictogramElementDelegate

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

Constructors
Constructor and Description
`PictogramElementDelegate(IConfigurationProviderInternal configurationProvider, PictogramElement pictogramElement, org.eclipse.gef.EditPart containerEditPart)` Creates a new PictogramElementDelegate.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `activate()` Activate.
`org.eclipse.draw2d.IFigure` `createFigure()` Creates the figure.
`void` `deactivate()` Deactivate.
`java.lang.Object` `getAdapter(java.lang.Class key)`
`IConfigurationProviderInternal` `getConfigurationProvider()` Gets the configuration provider.
`IFeatureProvider` `getFeatureProvider()` Gets the feature provider.
`org.eclipse.draw2d.IFigure` `getFigureForGraphicsAlgorithm(GraphicsAlgorithm graphicsAlgorithm)` Gets the figure for graphics algorithm.
`java.util.List<org.eclipse.draw2d.IFigure>` `getMainFiguresFromChildEditparts()`
`PictogramElement` `getPictogramElement()` Gets the pictogram element.
`IVisualState` `getVisualState()` Returns the visual state of this shape.
`boolean` `isValid()`
`void` `refreshDecorators()`
`void` `refreshEditPartsForModelChildrenAndSourceConnections(org.eclipse.gef.EditPart ep)` refresh edit parts for child pictogram elements.
`void` `refreshFigureForEditPart()` Refresh figure for edit part.
`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.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### PictogramElementDelegate

    public PictogramElementDelegate(IConfigurationProviderInternal configurationProvider,
                                    PictogramElement pictogramElement,
                                    org.eclipse.gef.EditPart containerEditPart)

Creates a new PictogramElementDelegate.

Parameters:
  `configurationProvider` - the configuration provider
  `pictogramElement` - the pictogram element
  `containerEditPart` - the container edit part

### Method Detail

#### activate

    public void activate()

Description copied from interface: `IPictogramElementDelegate`
Activate.

Specified by:
  `activate` in interface `IPictogramElementDelegate`

#### createFigure

    public org.eclipse.draw2d.IFigure createFigure()

Description copied from interface: `IPictogramElementDelegate`
Creates the figure.

Specified by:
  `createFigure` in interface `IPictogramElementDelegate`
Returns:
  the i figure

#### deactivate

    public void deactivate()

Description copied from interface: `IPictogramElementDelegate`
Deactivate.

Specified by:
  `deactivate` in interface `IPictogramElementDelegate`

#### getAdapter

    public java.lang.Object getAdapter(java.lang.Class key)

Specified by:
  `getAdapter` in interface `IAdaptable`

#### getConfigurationProvider

    public IConfigurationProviderInternal getConfigurationProvider()

Gets the configuration provider.

Specified by:
  `getConfigurationProvider` in interface `IPictogramElementDelegate`
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 interface `IPictogramElementDelegate`
Parameters:
  `graphicsAlgorithm` - the graphics algorithm
Returns:
  the figure for graphics algorithm

#### getPictogramElement

    public PictogramElement getPictogramElement()

Description copied from interface: `IPictogramElementDelegate`
Gets the pictogram element.

Specified by:
  `getPictogramElement` in interface `IPictogramElementDelegate`
Returns:
  the pictogram element

#### refreshEditPartsForModelChildrenAndSourceConnections

    public void refreshEditPartsForModelChildrenAndSourceConnections(org.eclipse.gef.EditPart ep)

refresh edit parts for child pictogram elements.

Specified by:
  `refreshEditPartsForModelChildrenAndSourceConnections` in interface `IPictogramElementDelegate`
Parameters:
  `ep` - the ep

#### refreshFigureForEditPart

    public void refreshFigureForEditPart()

Description copied from interface: `IPictogramElementDelegate`
Refresh figure for edit part.

Specified by:
  `refreshFigureForEditPart` in interface `IPictogramElementDelegate`

#### getFeatureProvider

    public IFeatureProvider getFeatureProvider()

Description copied from interface: `IFeatureProviderHolder`
Gets the feature provider.

Specified by:
  `getFeatureProvider` in interface `IFeatureProviderHolder`
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 interface `IPictogramElementDelegate`

#### isValid

    public boolean isValid()

Specified by:
  `isValid` in interface `IPictogramElementDelegate`
Returns:
  true, if edit part (and it's delegate) are still valid (alive)

#### getVisualState

    public IVisualState getVisualState()

Returns the visual state of this shape.

Specified by:
  `getVisualState` in interface `IVisualStateHolder`
Returns:
  The visual state of this shape.

#### getMainFiguresFromChildEditparts

    public java.util.List<org.eclipse.draw2d.IFigure> getMainFiguresFromChildEditparts()

Specified by:
  `getMainFiguresFromChildEditparts` in interface `IPictogramElementDelegate`

#### refreshDecorators

    public void refreshDecorators()

Specified by:
  `refreshDecorators` in interface `IPictogramElementDelegate`