org.eclipse.graphiti.features
Class FeatureCheckerAdapter

java.lang.Object
  extended by 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.


Field Summary
private  boolean allow
           
 
Constructor Summary
FeatureCheckerAdapter(boolean allow)
          Creates an FeatureCheckerAdapter.
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allow

private final boolean allow
Constructor Detail

FeatureCheckerAdapter

public FeatureCheckerAdapter(boolean allow)
Creates an FeatureCheckerAdapter.

Parameters:
allow - the boolean allow
Method Detail

allowAdd

public boolean allowAdd(IContext context)
Specified by:
allowAdd in interface IFeatureChecker

allowConnectionSplit

public boolean allowConnectionSplit(ISplitConnectionContext context)
Specified by:
allowConnectionSplit in interface IFeatureChecker

allowCreate

public boolean allowCreate()
Specified by:
allowCreate in interface IFeatureChecker

allowCustomFeatures

public boolean allowCustomFeatures(ICustomContext context)
Specified by:
allowCustomFeatures in interface IFeatureChecker

allowDelete

public boolean allowDelete(IDeleteContext context)
Specified by:
allowDelete in interface IFeatureChecker

allowDragAndDrop

public boolean allowDragAndDrop(IPictogramElementContext context)
Specified by:
allowDragAndDrop in interface IFeatureChecker

allowLayout

public boolean allowLayout(ILayoutContext context)
Specified by:
allowLayout in interface IFeatureChecker

allowMove

public boolean allowMove(IContext context)
Specified by:
allowMove in interface IFeatureChecker

allowPaste

public boolean allowPaste(IPasteContext context)
Specified by:
allowPaste in interface IFeatureChecker

allowReconnect

public boolean allowReconnect(IReconnectionContext context)
Specified by:
allowReconnect in interface IFeatureChecker

allowRemove

public boolean allowRemove(IContext context)
Specified by:
allowRemove in interface IFeatureChecker

allowResize

public boolean allowResize(IResizeShapeContext context)
Specified by:
allowResize in interface IFeatureChecker

allowUpdate

public boolean allowUpdate(IUpdateContext context)
Specified by:
allowUpdate in interface IFeatureChecker

allow

public boolean allow(IFeature feature,
                     IContext context)
Specified by:
allow in interface IFeatureChecker


Copyright (c) SAP AG 2005, 2010.