public class DefaultFeatureProviderWithPatterns extends DefaultFeatureProvider implements IFeatureProviderWithPatterns
addPattern(IPattern) and
addConnectionPattern(IConnectionPattern)) delegate to the pattern
automatically.| Constructor and Description |
|---|
DefaultFeatureProviderWithPatterns(IDiagramTypeProvider dtp)
Creates a new instance of
DefaultFeatureProviderWithPatterns. |
| Modifier and Type | Method and Description |
|---|---|
void |
activateDirectEditingForPatterns(PictogramElement mainPictogramElement,
java.lang.Object domainObject)
Convenience method to activate the direct editing for the given
PictogramElement and domain object. |
void |
activateDirectEditingForPatterns(PictogramElement mainPictogramElement,
java.lang.Object domainObject,
java.lang.String keyProperty)
Convenience method to activate the direct editing for the given
PictogramElement and domain object. |
void |
addConnectionPattern(IConnectionPattern pattern)
Adds a pattern defined to handle connections to the list of registered
patterns.
|
void |
addPattern(IPattern pattern)
Adds a pattern defined to handle shapes to the list of registered
patterns.
|
IAddFeature |
getAddFeature(IAddContext context)
Tries to retrieve an add feature suiting the given add context from the
registered patterns.
|
java.lang.Object |
getBusinessObjectForPictogramElement(PictogramElement pictogramElement)
Helper method to find the domain object for a given
PictogramElement. |
ICreateConnectionFeature[] |
getCreateConnectionFeatures()
Retrieves an array of create connection features that are available from
the registered patterns and the super class of this feature provider.
|
ICreateFeature[] |
getCreateFeatures()
Retrieves an array of create features that are available from the
registered patterns and the super class of this feature provider.
|
IDeleteFeature |
getDeleteFeature(IDeleteContext context)
Tries to retrieve a delete feature suiting the given delete context from
the registered patterns.
|
IDirectEditingFeature |
getDirectEditingFeature(IDirectEditingContext context)
Tries to retrieve a direct editing feature suiting the given direct
editing context from the registered patterns.
|
ILayoutFeature |
getLayoutFeature(ILayoutContext context)
Tries to retrieve a layout feature suiting the given layout context from
the registered patterns.
|
IMoveShapeFeature |
getMoveShapeFeature(IMoveShapeContext context)
Tries to retrieve a move feature for shapes suiting the given move
context from the registered patterns.
|
IPattern |
getPatternForPictogramElement(PictogramElement pe)
Gets the pattern for pictogram element.
|
IRemoveFeature |
getRemoveFeature(IRemoveContext context)
Tries to retrieve a remove feature suiting the given remove context from
the registered patterns.
|
IResizeShapeFeature |
getResizeShapeFeature(IResizeShapeContext context)
Tries to retrieve a resize feature for shapes suiting the given resize
context from the registered patterns.
|
IUpdateFeature |
getUpdateFeature(IUpdateContext context)
Tries to retrieve an update feature suiting the given update context from
the registered patterns.
|
getAddBendpointFeature, getCopyFeature, getCustomFeatures, getMoveAnchorFeature, getMoveBendpointFeature, getMoveConnectionDecoratorFeature, getPasteFeature, getPrintFeature, getRemoveBendpointFeature, getSaveImageFeatureaddIfPossible, canAdd, canLayout, canUpdate, dispose, getAllBusinessObjectsForPictogramElement, getAllPictogramElementsForBusinessObject, getDiagramTypeProvider, getDirectEditingInfo, getDragAndDropFeatures, getPictogramElementForBusinessObject, getReconnectionFeature, hasPictogramElementForBusinessObject, layoutIfPossible, link, link, updateIfPossible, updateIfPossibleAndNeeded, updateNeededpublic DefaultFeatureProviderWithPatterns(IDiagramTypeProvider dtp)
DefaultFeatureProviderWithPatterns.
This is usually done from the diagram type provider.dtp - The diagram type provider associated with this feature
provider.public void addPattern(IPattern pattern)
addConnectionPattern(IConnectionPattern). The pattern must not
be null, or a IllegalArgumentException will be
thrown.addPattern in interface IPatternContainerpattern - The Pattern to addpublic void addConnectionPattern(IConnectionPattern pattern)
addPattern(IPattern). The pattern must not be null,
or a IllegalArgumentException will be thrown.pattern - The Pattern to addpublic IAddFeature getAddFeature(IAddContext context)
getAddFeatureAdditional(IAddContext)).getAddFeature in interface IFeatureProvidergetAddFeature in class AbstractFeatureProvidercontext - An IAddContext describing the needed functionalityIAddFeature in case a suitable functionality has been
found, null otherwise.IAddFeaturepublic ICreateFeature[] getCreateFeatures()
getCreateConnectionFeaturesAdditional()).getCreateFeatures in interface IFeatureProvidergetCreateFeatures in class AbstractFeatureProviderICreateFeatures in case a suitable
functionality has been found, an empty array otherwise.ICreateFeaturepublic IDeleteFeature getDeleteFeature(IDeleteContext context)
getDeleteFeatureAdditional(IDeleteContext)).getDeleteFeature in interface IFeatureProvidergetDeleteFeature in class DefaultFeatureProvidercontext - An IDeleteContext describing the needed functionalityIDeleteFeature in case a suitable functionality has
been found, null otherwise.IDeleteFeaturepublic IRemoveFeature getRemoveFeature(IRemoveContext context)
getRemoveFeatureAdditional(IRemoveContext)).getRemoveFeature in interface IFeatureProvidergetRemoveFeature in class DefaultFeatureProvidercontext - An IRemoveContext describing the needed functionalityIRemoveFeature in case a suitable functionality has
been found, null otherwise.IRemoveFeaturepublic ILayoutFeature getLayoutFeature(ILayoutContext context)
getLayoutFeatureAdditional(ILayoutContext)).getLayoutFeature in interface IFeatureProvidergetLayoutFeature in class AbstractFeatureProvidercontext - An ILayoutContext describing the needed functionalityILayoutFeature in case a suitable functionality has
been found, null otherwise.ILayoutFeaturepublic IMoveShapeFeature getMoveShapeFeature(IMoveShapeContext context)
getMoveShapeFeatureAdditional(IMoveShapeContext)).getMoveShapeFeature in interface IFeatureProvidergetMoveShapeFeature in class DefaultFeatureProvidercontext - An IMoveShapeContext describing the needed
functionalityIMoveShapeFeature in case a suitable functionality has
been found, null otherwise.IMoveShapeFeaturepublic IResizeShapeFeature getResizeShapeFeature(IResizeShapeContext context)
getResizeShapeFeatureAdditional(IResizeShapeContext)).getResizeShapeFeature in interface IFeatureProvidergetResizeShapeFeature in class DefaultFeatureProvidercontext - An IResizeShapeContext describing the needed
functionalityIResizeShapeFeature in case a suitable functionality
has been found, null otherwise.IResizeShapeFeaturepublic IUpdateFeature getUpdateFeature(IUpdateContext context)
getUpdateFeatureAdditional(IUpdateContext)).getUpdateFeature in interface IFeatureProvidergetUpdateFeature in class DefaultFeatureProvidercontext - An IUpdateContext describing the needed functionalityIUpdateFeature in case a suitable functionality has
been found, null otherwise.IUpdateFeaturepublic IPattern getPatternForPictogramElement(PictogramElement pe)
IFeatureProviderWithPatternsgetPatternForPictogramElement in interface IFeatureProviderWithPatternspe - the pictogram elementpublic void activateDirectEditingForPatterns(PictogramElement mainPictogramElement, java.lang.Object domainObject)
PictogramElement and domain object. The default implementation
tries to retrieve the direct editing functionality from the registered
patterns for shapes.activateDirectEditingForPatterns in interface IFeatureProviderWithPatternsmainPictogramElement - The root PictogramElement for which direct editing
shall be triggered. This pictogram element is used to find a
suitable pattern for this request via
AbstractPattern.isPatternRoot(PictogramElement).domainObject - The domain object behind the direct editing request. This
object is passed to the IDirectEditingInfo.public void activateDirectEditingForPatterns(PictogramElement mainPictogramElement, java.lang.Object domainObject, java.lang.String keyProperty)
PictogramElement and domain object. The default implementation
tries to retrieve the direct editing functionality from the registered
patterns for shapes.activateDirectEditingForPatterns in interface IFeatureProviderWithPatternsmainPictogramElement - The root PictogramElement for which direct editing
shall be triggered. This pictogram element is used to find a
suitable pattern for this request via
AbstractPattern.isPatternRoot(PictogramElement).domainObject - The domain object behind the direct editing request. This
object is passed to the IDirectEditingInfo.keyProperty - An additional key property that is passed to the
IDirectEditingInfo.public ICreateConnectionFeature[] getCreateConnectionFeatures()
getCreateConnectionFeaturesAdditional()).getCreateConnectionFeatures in interface IFeatureProvidergetCreateConnectionFeatures in class AbstractFeatureProviderICreateConnectionFeatures in case a suitable
functionality has been found, an empty array otherwise.ICreateConnectionFeaturepublic IDirectEditingFeature getDirectEditingFeature(IDirectEditingContext context)
getDirectEditingFeatureAdditional(IDirectEditingContext)).getDirectEditingFeature in interface IFeatureProvidergetDirectEditingFeature in class AbstractFeatureProvidercontext - An IDirectEditingContext describing the needed
functionalityIDirectEditingFeature in case a suitable functionality
has been found, null otherwise.IDirectEditingFeaturepublic java.lang.Object getBusinessObjectForPictogramElement(PictogramElement pictogramElement)
PictogramElement. The default implementation first delegates to
AbstractFeatureProvider.getBusinessObjectForPictogramElement(PictogramElement)
and then directly tries to follow an eventually set link property, see
ILinkService.setLinkProperty(PictogramElement, String).getBusinessObjectForPictogramElement in interface IMappingProvidergetBusinessObjectForPictogramElement in class AbstractFeatureProviderpictogramElement - The PictogramElement to find the domain object for.null
otherwise.IMappingProvider.link(PictogramElement, Object)