|
||||||||||
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
public class DefaultRemoveFeature
The Class DefaultRemoveFeature.
Field Summary | |
---|---|
private static String |
DESC
|
private static String |
NAME
|
Constructor Summary | |
---|---|
DefaultRemoveFeature(IFeatureProvider fp)
Creates a new DefaultRemoveFeature . |
Method Summary | |
---|---|
boolean |
canExecute(IContext context)
Decides if the current feature can execute with the given context. |
boolean |
canRemove(IRemoveContext context)
Checks if given object could be removed. |
void |
execute(IContext context)
Executes the current feature with the given context. |
String |
getDescription()
Gets the description. |
String |
getName()
Gets the name. |
boolean |
isRemoveAbort()
The Graphiti framework will call this method after IRemove.preRemove(IRemoveContext) has been called and before the actual
remove is done. |
void |
postRemove(IRemoveContext context)
called after remove call. |
void |
preRemove(IRemoveContext context)
called prior to remove call. |
void |
remove(IRemoveContext context)
Remove the given object. |
protected void |
removeAllConnections(Anchor anchor)
|
protected void |
removeAllConnections(Shape shape)
Removes the all connections. |
private void |
removeCompositeConnections(CompositeConnection composite)
|
Methods inherited from class org.eclipse.graphiti.features.impl.AbstractFeature |
---|
addGraphicalRepresentation, canUndo, getAllBusinessObjectsForPictogramElement, getBusinessObjectForPictogramElement, getDiagram, getDiagramBehavior, getFeatureProvider, getProgressCallback, getUserDecision, hasDoneChanges, isAvailable, layoutPictogramElement, link, link, manageColor, manageColor, manageDefaultFont, 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 |
---|
canUndo, hasDoneChanges, isAvailable |
Methods inherited from interface org.eclipse.graphiti.features.IFeatureProviderHolder |
---|
getFeatureProvider |
Field Detail |
---|
private static final String NAME
private static final String DESC
Constructor Detail |
---|
public DefaultRemoveFeature(IFeatureProvider fp)
DefaultRemoveFeature
.
fp
- the feature providerMethod Detail |
---|
public boolean canRemove(IRemoveContext context)
IRemove
canRemove
in interface IRemove
context
- contains object to remove
public void remove(IRemoveContext context)
IRemove
remove
in interface IRemove
context
- contains object to removeprivate void removeCompositeConnections(CompositeConnection composite)
public void preRemove(IRemoveContext context)
IRemove
preRemove
in interface IRemove
context
- the contextpublic boolean isRemoveAbort()
IRemove
IRemove.preRemove(IRemoveContext)
has been called and before the actual
remove is done. In case this method returns true
, the
operation will be cancelled by the Graphiti framework by throwing an
OperationCanceledException
that causes am EMF revert of the
operation.
Implementing classes might e.g. set a flag in
IRemove.preRemove(IRemoveContext)
as cancellation indication and check
that that flag here.
isRemoveAbort
in interface IRemove
true
in case you want to cancel the current
operation, false
otherwise.protected void removeAllConnections(Shape shape)
shape
- the shapeprotected void removeAllConnections(Anchor anchor)
public void postRemove(IRemoveContext context)
IRemove
postRemove
in interface IRemove
context
- the contextpublic boolean canExecute(IContext context)
IFeature
canExecute
in interface IFeature
context
- this is the general input for this method
IContext
public void execute(IContext context)
IFeature
execute
in interface IFeature
context
- this is the general input for this methodIContext
public String getName()
IName
getName
in interface IName
getName
in class AbstractFeature
public String getDescription()
IDescription
getDescription
in interface IDescription
getDescription
in class AbstractFeature
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |