Package org.eclipse.graphiti.features
Class FeatureCheckerAdapter
- java.lang.Object
-
- org.eclipse.graphiti.features.FeatureCheckerAdapter
-
- All Implemented Interfaces:
IFeatureChecker
public class FeatureCheckerAdapter extends java.lang.Object implements IFeatureChecker
The Class FeatureCheckerAdapter is a convenience implementation of IFeatureChecker. All methods return either true or false. This class is expected to be sub-classed.
-
-
Constructor Summary
Constructors Constructor Description FeatureCheckerAdapter(boolean allow)
Creates anFeatureCheckerAdapter
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allow(IFeature feature, IContext context)
boolean
allowAdd(IContext context)
boolean
allowConnectionSplit(ISplitConnectionContext context)
boolean
allowCreate()
boolean
allowCustomFeatures(ICustomContext context)
boolean
allowDelete(IDeleteContext context)
boolean
allowDragAndDrop(IPictogramElementContext context)
boolean
allowLayout(ILayoutContext context)
boolean
allowMove(IContext context)
boolean
allowPaste(IPasteContext context)
boolean
allowReconnect(IReconnectionContext context)
boolean
allowRemove(IContext context)
boolean
allowResize(IResizeShapeContext context)
boolean
allowUpdate(IUpdateContext context)
-
-
-
Constructor Detail
-
FeatureCheckerAdapter
public FeatureCheckerAdapter(boolean allow)
Creates anFeatureCheckerAdapter
.- Parameters:
allow
- the boolean allow
-
-
Method Detail
-
allowAdd
public boolean allowAdd(IContext context)
- Specified by:
allowAdd
in interfaceIFeatureChecker
-
allowConnectionSplit
public boolean allowConnectionSplit(ISplitConnectionContext context)
- Specified by:
allowConnectionSplit
in interfaceIFeatureChecker
-
allowCreate
public boolean allowCreate()
- Specified by:
allowCreate
in interfaceIFeatureChecker
-
allowCustomFeatures
public boolean allowCustomFeatures(ICustomContext context)
- Specified by:
allowCustomFeatures
in interfaceIFeatureChecker
-
allowDelete
public boolean allowDelete(IDeleteContext context)
- Specified by:
allowDelete
in interfaceIFeatureChecker
-
allowDragAndDrop
public boolean allowDragAndDrop(IPictogramElementContext context)
- Specified by:
allowDragAndDrop
in interfaceIFeatureChecker
-
allowLayout
public boolean allowLayout(ILayoutContext context)
- Specified by:
allowLayout
in interfaceIFeatureChecker
-
allowMove
public boolean allowMove(IContext context)
- Specified by:
allowMove
in interfaceIFeatureChecker
-
allowPaste
public boolean allowPaste(IPasteContext context)
- Specified by:
allowPaste
in interfaceIFeatureChecker
-
allowReconnect
public boolean allowReconnect(IReconnectionContext context)
- Specified by:
allowReconnect
in interfaceIFeatureChecker
-
allowRemove
public boolean allowRemove(IContext context)
- Specified by:
allowRemove
in interfaceIFeatureChecker
-
allowResize
public boolean allowResize(IResizeShapeContext context)
- Specified by:
allowResize
in interfaceIFeatureChecker
-
allowUpdate
public boolean allowUpdate(IUpdateContext context)
- Specified by:
allowUpdate
in interfaceIFeatureChecker
-
allow
public boolean allow(IFeature feature, IContext context)
- Specified by:
allow
in interfaceIFeatureChecker
-
-