|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.graphiti.features.impl.AbstractFeatureProvider
public abstract class AbstractFeatureProvider
The Class AbstractFeatureProvider.
| Nested Class Summary | |
|---|---|
private class |
AbstractFeatureProvider.StringTransformer
|
| Field Summary | |
|---|---|
private IDirectEditingInfo |
directEditingInfo
|
private IDiagramTypeProvider |
dtp
|
protected static PictogramElement[] |
EMPTY_PICTOGRAM_ELEMENTS
The Constant EMPTY_PICTOGRAM_ELEMENTS. |
private IIndependenceSolver |
independenceSolver
|
protected static EObject[] |
NO_OBJECTS
The Constant EMPTY_REF_OBJECTS. |
(package private) AbstractFeatureProvider.StringTransformer |
st
|
private static ICustomFeature[] |
ZERO_CUSTOM_FEATURES
|
| Constructor Summary | |
|---|---|
AbstractFeatureProvider(IDiagramTypeProvider diagramTypeProvider)
Creates a new AbstractFeatureProvider. |
|
| Method Summary | |
|---|---|
PictogramElement |
addIfPossible(IAddContext context)
Adds the if possible. |
IReason |
canAdd(IAddContext context)
Can add. |
IReason |
canLayout(ILayoutContext context)
Checks if an layout process can be processed. |
IReason |
canUpdate(IUpdateContext context)
Checks if an update process can be processed. |
private PictogramLink |
createOrGetPictogramLink(PictogramElement pe)
|
private PictogramLink |
createPictogramLink(PictogramElement pe)
|
void |
dispose()
This is called to dispose the object. |
IAddBendpointFeature |
getAddBendpointFeature(IAddBendpointContext context)
Add bendpoint features handle the user's requst to have more connection bendpoints. |
IAddFeature |
getAddFeature(IAddContext context)
Add features create graphical representations of domain model objects. |
Object[] |
getAllBusinessObjectsForPictogramElement(PictogramElement pictogramElement)
Returns all business objects which are linked to the given pictogram element. |
PictogramElement[] |
getAllPictogramElementsForBusinessObject(Object businessObject)
Provides the pictogram elements which represents the given business object. |
Object |
getBusinessObjectForPictogramElement(PictogramElement pictogramElement)
Returns the first of possibly several business objects which are linked to the given pictogram element. |
ICreateConnectionFeature[] |
getCreateConnectionFeatures()
Gets the create connection features. |
ICreateFeature[] |
getCreateFeatures()
Provides all create features. |
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. |
IDiagramTypeProvider |
getDiagramTypeProvider()
Returns the diagram type provider. |
IDirectEditingFeature |
getDirectEditingFeature(IDirectEditingContext context)
Direct editing features handle direct editing functionality (including drop down lists and text completion). |
IDirectEditingInfo |
getDirectEditingInfo()
If a creation feature wants to switch directly into the direct editing mode (after the object creation), it must provide the necessary information via this object. |
IFeature[] |
getDragAndDropFeatures(IPictogramElementContext context)
if the user should be able to create connections directly from a pictogram element without using the connection tool you can provide an array of features. |
protected IIndependenceSolver |
getIndependenceSolver()
Gets the independence solver. |
ILayoutFeature |
getLayoutFeature(ILayoutContext context)
Layout features do the layouting work (sizes and dimensions) inside (and/or) outside a pictogram element. |
protected ILinkService |
getLinkService()
|
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. |
PictogramElement |
getPictogramElementForBusinessObject(Object businessObject)
Provides the first pictogram element which represents the given business object. |
abstract IPrintFeature |
getPrintFeature()
It is planned to use this for printing support. |
IReconnectionFeature |
getReconnectionFeature(IReconnectionContext context)
Reconnection features handle the change of a connection's start or end anchor. |
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. |
abstract 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. |
private String[] |
getValues(String value)
|
boolean |
hasPictogramElementForBusinessObject(Object businessObject)
Check does there have pictogram element linked to this business object. |
IReason |
layoutIfPossible(ILayoutContext context)
Process the layout process. |
void |
link(PictogramElement pictogramElement,
Object businessObject)
Links the pictogram element with a business object. |
void |
link(PictogramElement pictogramElement,
Object[] businessObjects)
Links the pictogram element with several business objects. |
protected void |
setIndependenceSolver(IIndependenceSolver independenceSolver)
Sets the independence solver. |
IReason |
updateIfPossible(IUpdateContext context)
Process the update process. |
IReason |
updateIfPossibleAndNeeded(IUpdateContext context)
Update if possible and needed. |
IReason |
updateNeeded(IUpdateContext context)
Checks if an update process is needed and has be processed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.graphiti.features.IFeatureProvider |
|---|
getCopyFeature, getPasteFeature |
| Field Detail |
|---|
private static final ICustomFeature[] ZERO_CUSTOM_FEATURES
protected static final EObject[] NO_OBJECTS
protected static final PictogramElement[] EMPTY_PICTOGRAM_ELEMENTS
private IDiagramTypeProvider dtp
private IDirectEditingInfo directEditingInfo
private IIndependenceSolver independenceSolver
AbstractFeatureProvider.StringTransformer st
| Constructor Detail |
|---|
public AbstractFeatureProvider(IDiagramTypeProvider diagramTypeProvider)
AbstractFeatureProvider.
diagramTypeProvider - the diagram type provider| Method Detail |
|---|
public IAddFeature getAddFeature(IAddContext context)
IFeatureProvider
getAddFeature in interface IFeatureProvidercontext - the context
IAddFeaturepublic ICreateConnectionFeature[] getCreateConnectionFeatures()
IFeatureProvider
getCreateConnectionFeatures in interface IFeatureProviderICreateConnectionFeaturepublic ICreateFeature[] getCreateFeatures()
IFeatureProvider
getCreateFeatures in interface IFeatureProviderICreateFeaturepublic ICustomFeature[] getCustomFeatures(ICustomContext context)
IFeatureProvider
getCustomFeatures in interface IFeatureProvidercontext - the context
ICustomFeaturepublic IDeleteFeature getDeleteFeature(IDeleteContext context)
IFeatureProvider
getDeleteFeature in interface IFeatureProvidercontext - the context
IDeleteFeaturepublic IDiagramTypeProvider getDiagramTypeProvider()
IFeatureProvider
getDiagramTypeProvider in interface IFeatureProviderIDiagramTypeProviderpublic IMoveAnchorFeature getMoveAnchorFeature(IMoveAnchorContext context)
IFeatureProviderFixPointAnchor).
getMoveAnchorFeature in interface IFeatureProvidercontext - the context
IMoveAnchorFeaturepublic IRemoveFeature getRemoveFeature(IRemoveContext context)
IFeatureProvider
getRemoveFeature in interface IFeatureProvidercontext - the context
IRemoveFeaturepublic IUpdateFeature getUpdateFeature(IUpdateContext context)
IFeatureProvider
getUpdateFeature in interface IFeatureProvidercontext - the context
IUpdateFeaturepublic ILayoutFeature getLayoutFeature(ILayoutContext context)
IFeatureProvider
getLayoutFeature in interface IFeatureProvidercontext - the context
ILayoutFeaturepublic IMoveShapeFeature getMoveShapeFeature(IMoveShapeContext context)
IFeatureProvider
getMoveShapeFeature in interface IFeatureProvidercontext - the context
IMoveShapeFeaturepublic IMoveConnectionDecoratorFeature getMoveConnectionDecoratorFeature(IMoveConnectionDecoratorContext context)
IFeatureProvider
getMoveConnectionDecoratorFeature in interface IFeatureProvidercontext - the context
IMoveConnectionDecoratorFeaturepublic IMoveBendpointFeature getMoveBendpointFeature(IMoveBendpointContext context)
IFeatureProviderFixPointAnchor).
getMoveBendpointFeature in interface IFeatureProvidercontext - the context
IMoveBendpointFeaturepublic IResizeShapeFeature getResizeShapeFeature(IResizeShapeContext context)
IFeatureProvider
getResizeShapeFeature in interface IFeatureProvidercontext - the context
IResizeShapeFeaturepublic IAddBendpointFeature getAddBendpointFeature(IAddBendpointContext context)
IFeatureProvider
getAddBendpointFeature in interface IFeatureProvidercontext - the context
IAddBendpointFeature,
IAddBendpointContextpublic IRemoveBendpointFeature getRemoveBendpointFeature(IRemoveBendpointContext context)
IFeatureProvider
getRemoveBendpointFeature in interface IFeatureProvidercontext - the context
IRemoveBendpointFeaturepublic IDirectEditingFeature getDirectEditingFeature(IDirectEditingContext context)
IFeatureProvider
getDirectEditingFeature in interface IFeatureProvidercontext - the context
IDirectEditingFeaturepublic IReason canUpdate(IUpdateContext context)
IFeatureProvider
canUpdate in interface IFeatureProvidercontext - the context
public IReason canLayout(ILayoutContext context)
IFeatureProvider
canLayout in interface IFeatureProvidercontext - the context
public IReason updateIfPossible(IUpdateContext context)
IFeatureProvider
updateIfPossible in interface IFeatureProvidercontext - the context
public IReason layoutIfPossible(ILayoutContext context)
IFeatureProvider
layoutIfPossible in interface IFeatureProvidercontext - the context
true IReason in
case the layout operation was executed, a false
IReason otherwise.public IReason updateNeeded(IUpdateContext context)
IFeatureProvider
updateNeeded in interface IFeatureProvidercontext - the context
public IReason updateIfPossibleAndNeeded(IUpdateContext context)
IFeatureProvider
updateIfPossibleAndNeeded in interface IFeatureProvidercontext - the context
public PictogramElement addIfPossible(IAddContext context)
IFeatureProvider
addIfPossible in interface IFeatureProvidercontext - the context
public IReason canAdd(IAddContext context)
IFeatureProvider
canAdd in interface IFeatureProvidercontext - the context
public final IDirectEditingInfo getDirectEditingInfo()
IFeatureProvider
getDirectEditingInfo in interface IFeatureProviderIDirectEditingInfopublic IReconnectionFeature getReconnectionFeature(IReconnectionContext context)
IFeatureProvider
getReconnectionFeature in interface IFeatureProvidercontext - the context
IReconnectionFeaturepublic abstract IPrintFeature getPrintFeature()
IFeatureProviderAbstractFeatureProvider
returns the an instance of DefaultPrintFeature which could be
overridden to influence the standard behaviour.null to disable printing.
getPrintFeature in interface IFeatureProvidernull to disable
printing.IPrintFeaturepublic abstract ISaveImageFeature getSaveImageFeature()
IFeatureProviderAbstractFeatureProvider
returns the an instance of DefaultSaveImageFeature which could be
overridden to influence the standard behaviour.null to disable save as image.
getSaveImageFeature in interface IFeatureProvidernull to disable save as
image.public IFeature[] getDragAndDropFeatures(IPictogramElementContext context)
IFeatureProvider
getDragAndDropFeatures in interface IFeatureProvidercontext - - the pictogram element the drag and drop should be initiated
on
public Object[] getAllBusinessObjectsForPictogramElement(PictogramElement pictogramElement)
IMappingProviderEcoreUtil#equals(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)
method, but this might be changed by clients by overriding
IToolBehaviorProvider.equalsBusinessObjects(Object, Object).
getAllBusinessObjectsForPictogramElement in interface IMappingProviderpictogramElement - The pictogram element for which to return the business
objects.
IMappingProvider.link(PictogramElement, Object[])private String[] getValues(String value)
public Object getBusinessObjectForPictogramElement(PictogramElement pictogramElement)
IMappingProviderEcoreUtil#equals(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)
method, but this might be changed by clients by overriding
IToolBehaviorProvider.equalsBusinessObjects(Object, Object). This
is a convenience method for
IMappingProvider.getAllBusinessObjectsForPictogramElement(PictogramElement),
because in many usecases only a single business object is linked.
getBusinessObjectForPictogramElement in interface IMappingProviderpictogramElement - The pictogram element for which to return the business object.
IMappingProvider.link(PictogramElement, Object)public PictogramElement[] getAllPictogramElementsForBusinessObject(Object businessObject)
IMappingProvider
getAllPictogramElementsForBusinessObject in interface IMappingProviderbusinessObject - the given business object
public PictogramElement getPictogramElementForBusinessObject(Object businessObject)
getPictogramElementForBusinessObject in interface IMappingProviderbusinessObject - the business object
IMappingProvider.getAllPictogramElementsForBusinessObject(Object)public boolean hasPictogramElementForBusinessObject(Object businessObject)
hasPictogramElementForBusinessObject in interface IMappingProviderbusinessObject - the business object
public void link(PictogramElement pictogramElement,
Object businessObject)
IMappingProvider
link in interface IMappingProviderpictogramElement - The pictogram element which to link to a new business object.businessObject - The business object to link. Can be null to just delete
previous links.
public void link(PictogramElement pictogramElement,
Object[] businessObjects)
IMappingProvider
link in interface IMappingProviderpictogramElement - The pictogram element which to link to new business objects.businessObjects - The business objects to link. Can be null or empty to just
delete previous links.private PictogramLink createPictogramLink(PictogramElement pe)
private PictogramLink createOrGetPictogramLink(PictogramElement pe)
protected final IIndependenceSolver getIndependenceSolver()
protected final void setIndependenceSolver(IIndependenceSolver independenceSolver)
independenceSolver - the new independence solverpublic void dispose()
IFeatureProvider
dispose in interface IFeatureProviderprotected ILinkService getLinkService()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||