Package org.eclipse.graphiti.ui.features

# Class DefaultFeatureProvider

java.lang.Object
org.eclipse.graphiti.features.impl.AbstractFeatureProvider
org.eclipse.graphiti.ui.features.DefaultFeatureProvider

All Implemented Interfaces:
  `IFeatureProvider`, `IMappingProvider`

Direct Known Subclasses:
  `DefaultFeatureProviderWithPatterns`

public class DefaultFeatureProvider extends AbstractFeatureProvider
The Class DefaultFeatureProvider.

## Field Summary

### Fields inherited from class org.eclipse.graphiti.features.impl.AbstractFeatureProvider

`EMPTY_PICTOGRAM_ELEMENTS, NO_OBJECTS`

## Constructor Summary

Constructors
Constructor
Description
`DefaultFeatureProvider(IDiagramTypeProvider dtp)`
Creates a new `DefaultFeatureProvider`.

## Method Summary

Modifier and Type
Method
Description
`IAddBendpointFeature`
`getAddBendpointFeature(IAddBendpointContext context)`
Add bendpoint features handle the user's requst to have more connection bendpoints.
`ICopyFeature`
`getCopyFeature(ICopyContext context)`
Copy features fill the clipboard.
`ICustomFeature[]`
`getCustomFeatures(ICustomContext context)`
Custom features can do anything.
`IDeleteFeature`
`getDeleteFeature(IDeleteContext context)`
Delete features remove the grapical representations of domain model objects as well as the domain model objects itself.
`IMoveAnchorFeature`
`getMoveAnchorFeature(IMoveAnchorContext context)`
Move features respond to user's move requests.
`IMoveBendpointFeature`
`getMoveBendpointFeature(IMoveBendpointContext context)`
Move features respond to user's move requests.
`IMoveConnectionDecoratorFeature`
`getMoveConnectionDecoratorFeature(IMoveConnectionDecoratorContext context)`
Move features respond to user's move requests.
`IMoveShapeFeature`
`getMoveShapeFeature(IMoveShapeContext context)`
Move shape features respond to user's move requests.
`IPasteFeature`
`getPasteFeature(IPasteContext context)`
Paste features bring clipboard content to the diagram.
`IPrintFeature`
`getPrintFeature()`
It is planned to use this for printing support.
`IRemoveBendpointFeature`
`getRemoveBendpointFeature(IRemoveBendpointContext context)`
Add bendpoint features handle the user's requst to remove connection bendpoints.
`IRemoveFeature`
`getRemoveFeature(IRemoveContext context)`
Remove features remove the grapical representations of domain model objects.
`IResizeShapeFeature`
`getResizeShapeFeature(IResizeShapeContext context)`
Resize shape features respond to user's resize requests.
`ISaveImageFeature`
`getSaveImageFeature()`
It is planned to use this for save as image support.
`IUpdateFeature`
`getUpdateFeature(IUpdateContext context)`
Update features do the synchronization work and transport data from domain model to pictograms model elements.

### Methods inherited from class org.eclipse.graphiti.features.impl.AbstractFeatureProvider

`addIfPossible, canAdd, canLayout, canUpdate, dispose, getAddFeature, getAllBusinessObjectsForPictogramElement, getAllPictogramElementsForBusinessObject, getBusinessObjectForPictogramElement, getCreateConnectionFeatures, getCreateFeatures, getDiagramTypeProvider, getDirectEditingFeature, getDirectEditingInfo, getDragAndDropFeatures, getIndependenceSolver, getLayoutFeature, getLinkService, getPictogramElementForBusinessObject, getReconnectionFeature, hasPictogramElementForBusinessObject, layoutIfPossible, link, link, setIndependenceSolver, updateIfPossible, updateIfPossibleAndNeeded, updateNeeded`

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

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

## Constructor Details

### DefaultFeatureProvider

public DefaultFeatureProvider(IDiagramTypeProvider dtp)
Creates a new `DefaultFeatureProvider`.

Parameters:
  `dtp` - the default feature provider

## Method Details

### getAddBendpointFeature

public IAddBendpointFeature getAddBendpointFeature(IAddBendpointContext context)
Description copied from interface: `IFeatureProvider`
Add bendpoint features handle the user's requst to have more connection bendpoints.

Specified by:
  `getAddBendpointFeature` in interface `IFeatureProvider`
Overrides:
  `getAddBendpointFeature` in class `AbstractFeatureProvider`
Parameters:
  `context` - the context
Returns:
  add feature according to the given context
See Also:
  - `IAddBendpointFeature`
  - `IAddBendpointContext`

### getCopyFeature

public ICopyFeature getCopyFeature(ICopyContext context)
Description copied from interface: `IFeatureProvider`
Copy features fill the clipboard.

Parameters:
  `context` - the context
Returns:
  copy feature according to the given context
See Also:
  - `ICopyFeature`

### getCustomFeatures

public ICustomFeature[] getCustomFeatures(ICustomContext context)
Description copied from interface: `IFeatureProvider`
Custom features can do anything. Their functionality can not be planned by the graphics framework (team).

Specified by:
  `getCustomFeatures` in interface `IFeatureProvider`
Overrides:
  `getCustomFeatures` in class `AbstractFeatureProvider`
Parameters:
  `context` - the context
Returns:
  custom feature according to the given context
See Also:
  - `ICustomFeature`

### getDeleteFeature

public IDeleteFeature getDeleteFeature(IDeleteContext context)
Description copied from interface: `IFeatureProvider`
Delete features remove the grapical representations of domain model objects as well as the domain model objects itself.

Specified by:
  `getDeleteFeature` in interface `IFeatureProvider`
Overrides:
  `getDeleteFeature` in class `AbstractFeatureProvider`
Parameters:
  `context` - the context
Returns:
  delete feature according to the given context
See Also:
  - `IDeleteFeature`

### getMoveAnchorFeature

public IMoveAnchorFeature getMoveAnchorFeature(IMoveAnchorContext context)
Description copied from interface: `IFeatureProvider`
Move features respond to user's move requests. This one is especially for fix point anchors ( `FixPointAnchor`).

Specified by:
  `getMoveAnchorFeature` in interface `IFeatureProvider`
Overrides:
  `getMoveAnchorFeature` in class `AbstractFeatureProvider`
Parameters:
  `context` - the context
Returns:
  move feature according to the given context
See Also:
  - `IMoveAnchorFeature`

### getMoveBendpointFeature

public IMoveBendpointFeature getMoveBendpointFeature(IMoveBendpointContext context)
Description copied from interface: `IFeatureProvider`
Move features respond to user's move requests. This one is especially for fix point anchors ( `FixPointAnchor`).

Specified by:
  `getMoveBendpointFeature` in interface `IFeatureProvider`
Overrides:
  `getMoveBendpointFeature` in class `AbstractFeatureProvider`
Parameters:
  `context` - the context
Returns:
  move feature according to the given context
See Also:
  - `IMoveBendpointFeature`

### getMoveConnectionDecoratorFeature

public IMoveConnectionDecoratorFeature getMoveConnectionDecoratorFeature(IMoveConnectionDecoratorContext context)
Description copied from interface: `IFeatureProvider`
Move features respond to user's move requests.

Specified by:
  `getMoveConnectionDecoratorFeature` in interface `IFeatureProvider`
Overrides:
  `getMoveConnectionDecoratorFeature` in class `AbstractFeatureProvider`
Parameters:
  `context` - the context
Returns:
  move feature according to the given context
See Also:
  - `IMoveConnectionDecoratorFeature`

### getMoveShapeFeature

public IMoveShapeFeature getMoveShapeFeature(IMoveShapeContext context)
Description copied from interface: `IFeatureProvider`
Move shape features respond to user's move requests.

Specified by:
  `getMoveShapeFeature` in interface `IFeatureProvider`
Overrides:
  `getMoveShapeFeature` in class `AbstractFeatureProvider`
Parameters:
  `context` - the context
Returns:
  move feature according to the given context
See Also:
  - `IMoveShapeFeature`

### getPasteFeature

public IPasteFeature getPasteFeature(IPasteContext context)
Description copied from interface: `IFeatureProvider`
Paste features bring clipboard content to the diagram.

Parameters:
  `context` - the context
Returns:
  copy feature according to the given context
See Also:
  - `ICopyFeature`

### getPrintFeature

public IPrintFeature getPrintFeature()
Description copied from interface: `IFeatureProvider`
It is planned to use this for printing support. Not yet supported perfectly. The default implementation in `AbstractFeatureProvider` returns the an instance of
invalid reference

    DefaultPrintFeature

which could be overridden to influence the standard behaviour.
Return `null` to disable printing.

Specified by:
  `getPrintFeature` in interface `IFeatureProvider`
Specified by:
  `getPrintFeature` in class `AbstractFeatureProvider`
Returns:
  The print feature to use or `null` to disable printing.
See Also:
  - `IPrintFeature`

### getSaveImageFeature

public ISaveImageFeature getSaveImageFeature()
Description copied from interface: `IFeatureProvider`
It is planned to use this for save as image support. Not yet supported perfectly. The default implementation in `AbstractFeatureProvider` returns the an instance of
invalid reference

    DefaultSaveImageFeature

which could be overridden to influence the standard behaviour.
Return `null` to disable save as image.

Specified by:
  `getSaveImageFeature` in interface `IFeatureProvider`
Specified by:
  `getSaveImageFeature` in class `AbstractFeatureProvider`
Returns:
  The save feature to use or `null` to disable save as image.

### getRemoveBendpointFeature

public IRemoveBendpointFeature getRemoveBendpointFeature(IRemoveBendpointContext context)
Description copied from interface: `IFeatureProvider`
Add bendpoint features handle the user's requst to remove connection bendpoints.

Specified by:
  `getRemoveBendpointFeature` in interface `IFeatureProvider`
Overrides:
  `getRemoveBendpointFeature` in class `AbstractFeatureProvider`
Parameters:
  `context` - the context
Returns:
  remove feature according to the given context
See Also:
  - `IRemoveBendpointFeature`

### getResizeShapeFeature

public IResizeShapeFeature getResizeShapeFeature(IResizeShapeContext context)
Description copied from interface: `IFeatureProvider`
Resize shape features respond to user's resize requests.

Specified by:
  `getResizeShapeFeature` in interface `IFeatureProvider`
Overrides:
  `getResizeShapeFeature` in class `AbstractFeatureProvider`
Parameters:
  `context` - the context
Returns:
  resize feature according to the given context
See Also:
  - `IResizeShapeFeature`

### getRemoveFeature

public IRemoveFeature getRemoveFeature(IRemoveContext context)
Description copied from interface: `IFeatureProvider`
Remove features remove the grapical representations of domain model objects.

Specified by:
  `getRemoveFeature` in interface `IFeatureProvider`
Overrides:
  `getRemoveFeature` in class `AbstractFeatureProvider`
Parameters:
  `context` - the context
Returns:
  remove feature according to the given context
See Also:
  - `IRemoveFeature`

### getUpdateFeature

public IUpdateFeature getUpdateFeature(IUpdateContext context)
Description copied from interface: `IFeatureProvider`
Update features do the synchronization work and transport data from domain model to pictograms model elements.

Specified by:
  `getUpdateFeature` in interface `IFeatureProvider`
Overrides:
  `getUpdateFeature` in class `AbstractFeatureProvider`
Parameters:
  `context` - the context
Returns:
  update feature according to the given context
See Also:
  - `IUpdateFeature`