org.eclipse.graphiti.features.impl
Class DefaultRemoveFeature

java.lang.Object
  extended by org.eclipse.graphiti.features.impl.AbstractFeature
      extended by org.eclipse.graphiti.features.impl.DefaultRemoveFeature
All Implemented Interfaces:
IFeature, IFeatureProviderHolder, IRemoveFeature, IRemove, IDescription, IName
Direct Known Subclasses:
RemoveFeatureForPattern

public class DefaultRemoveFeature
extends AbstractFeature
implements IRemoveFeature

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.
 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, getDiagramEditor, 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

NAME

private static final String NAME

DESC

private static final String DESC
Constructor Detail

DefaultRemoveFeature

public DefaultRemoveFeature(IFeatureProvider fp)
Creates a new DefaultRemoveFeature.

Parameters:
fp - the feature provider
Method Detail

canRemove

public boolean canRemove(IRemoveContext context)
Description copied from interface: IRemove
Checks if given object could be removed.

Specified by:
canRemove in interface IRemove
Parameters:
context - contains object to remove
Returns:
true if remove is possible

remove

public void remove(IRemoveContext context)
Description copied from interface: IRemove
Remove the given object.

Specified by:
remove in interface IRemove
Parameters:
context - contains object to remove

removeCompositeConnections

private void removeCompositeConnections(CompositeConnection composite)

preRemove

public void preRemove(IRemoveContext context)
Description copied from interface: IRemove
called prior to remove call.

Specified by:
preRemove in interface IRemove
Parameters:
context - the context

removeAllConnections

protected void removeAllConnections(Shape shape)
Removes the all connections.

Parameters:
shape - the shape

removeAllConnections

protected void removeAllConnections(Anchor anchor)
Since:
0.9

postRemove

public void postRemove(IRemoveContext context)
Description copied from interface: IRemove
called after remove call.

Specified by:
postRemove in interface IRemove
Parameters:
context - the context

canExecute

public boolean canExecute(IContext context)
Description copied from interface: IFeature
Decides if the current feature can execute with the given context.

Specified by:
canExecute in interface IFeature
Parameters:
context - this is the general input for this method
Returns:
true if the feature can be executed, false if not
See Also:
IContext

execute

public void execute(IContext context)
Description copied from interface: IFeature
Executes the current feature with the given context.

Specified by:
execute in interface IFeature
Parameters:
context - this is the general input for this method
See Also:
IContext

getName

public String getName()
Description copied from interface: IName
Gets the name.

Specified by:
getName in interface IName
Overrides:
getName in class AbstractFeature
Returns:
the name

getDescription

public String getDescription()
Description copied from interface: IDescription
Gets the description.

Specified by:
getDescription in interface IDescription
Overrides:
getDescription in class AbstractFeature
Returns:
the description


Copyright (c) SAP AG 2005, 2012.