|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.graphiti.features.impl.AbstractFeature
org.eclipse.graphiti.features.impl.DefaultRemoveFeature
org.eclipse.graphiti.pattern.RemoveFeatureForPattern
public class RemoveFeatureForPattern
This feature wraps the remove functionality of a pattern for calls of the Graphiti framework. Clients should not need to use this class directly.
Field Summary | |
---|---|
private IFeatureForPattern |
delegate
|
Constructor Summary | |
---|---|
RemoveFeatureForPattern(IFeatureProvider featureProvider,
IPattern pattern)
Creates a new RemoveFeatureForPattern . |
Method Summary | |
---|---|
boolean |
canRedo(IContext context)
Decides if the processed feature can be re-done. |
boolean |
canRemove(IRemoveContext context)
Checks if given object could be removed. |
boolean |
canUndo(IContext context)
Decides if the current feature can be undone - this is the undo of the execute operation. |
boolean |
hasDoneChanges()
Is queried by the framework after a feature has been executed to find out if this feature should appear in the undo stack of e.g. |
void |
postRemove(IRemoveContext context)
called after remove call. |
void |
preRemove(IRemoveContext context)
called prior to remove call. |
void |
redo(IContext context)
This method will be called to actually do the work needed for redo. |
void |
remove(IRemoveContext context)
Remove the given object. |
void |
undo(IContext context)
This method will be called to actually do the work needed for undo. |
Methods inherited from class org.eclipse.graphiti.features.impl.DefaultRemoveFeature |
---|
canExecute, execute, getDescription, getName, removeAllConnections, removeAllConnections |
Methods inherited from class org.eclipse.graphiti.features.impl.AbstractFeature |
---|
addGraphicalRepresentation, getAllBusinessObjectsForPictogramElement, getBusinessObjectForPictogramElement, getDiagram, getDiagramBehavior, getDiagramEditor, getFeatureProvider, getProgressCallback, getUserDecision, isAvailable, layoutPictogramElement, link, link, manageColor, manageColor, manageDefaultFont, manageFont, manageFont, setProgressCallback, toString, updatePictogramElement |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.graphiti.features.IFeature |
---|
isAvailable |
Methods inherited from interface org.eclipse.graphiti.features.IFeatureProviderHolder |
---|
getFeatureProvider |
Field Detail |
---|
private IFeatureForPattern delegate
Constructor Detail |
---|
public RemoveFeatureForPattern(IFeatureProvider featureProvider, IPattern pattern)
RemoveFeatureForPattern
.
featureProvider
- the feature providerpattern
- the patternMethod Detail |
---|
public boolean canRemove(IRemoveContext context)
IRemove
canRemove
in interface IRemove
canRemove
in class DefaultRemoveFeature
context
- contains object to remove
public void preRemove(IRemoveContext context)
IRemove
preRemove
in interface IRemove
preRemove
in class DefaultRemoveFeature
context
- the contextpublic void remove(IRemoveContext context)
IRemove
remove
in interface IRemove
remove
in class DefaultRemoveFeature
context
- contains object to removepublic void postRemove(IRemoveContext context)
IRemove
postRemove
in interface IRemove
postRemove
in class DefaultRemoveFeature
context
- the contextpublic boolean canUndo(IContext context)
IFeature
canUndo
in interface ICustomUndoableFeature
canUndo
in interface IFeature
canUndo
in class AbstractFeature
context
- this is the general input for this method
IContext
public void undo(IContext context)
ICustomUndoableFeature
undo
in interface ICustomUndoableFeature
context
- this is the instance of the IContext
object that was
in use when executing the featurepublic boolean canRedo(IContext context)
ICustomUndoableFeature
Note that as soon as any feature reports false
here, also
all consecutive entries in the command stack are no longer reachable for
redo.
canRedo
in interface ICustomUndoableFeature
context
- this is the instance of the IContext
object that was
in use when executing the feature
public void redo(IContext context)
ICustomUndoableFeature
redo
in interface ICustomUndoableFeature
context
- this is the instance of the IContext
object that was
in use when executing the featurepublic boolean hasDoneChanges()
IFeature
AbstractFeature
), but features may decide to override this
behavior. Note that this is a dynamic attribute of the feature that is
queried each time after the feature has been executed.
IMPORTANT NOTE: The implementor of the feature is responsible for
correctly implementing this method! It might lead to inconsistencies in
the command stack if this method returns false
although the
feature did changes.
hasDoneChanges
in interface IFeature
hasDoneChanges
in class AbstractFeature
true
if the feature should appear in the undo stack,
false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |