|
||||||||||
| 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.ui.features.DefaultDeleteFeature
public class DefaultDeleteFeature
The Class DefaultDeleteFeature.
| Field Summary | |
|---|---|
private boolean |
doneChanges
|
private static java.lang.String |
NAME
|
| Constructor Summary | |
|---|---|
DefaultDeleteFeature(IFeatureProvider fp)
Creates a new DefaultDeleteFeature. |
|
| Method Summary | |
|---|---|
boolean |
canDelete(IDeleteContext context)
Can delete. |
boolean |
canExecute(IContext context)
Decides if the current feature can execute with the given context. |
void |
delete(IDeleteContext context)
Delete. |
protected void |
deleteBusinessObject(java.lang.Object bo)
Delete business object. |
protected void |
deleteBusinessObjects(java.lang.Object[] businessObjects)
Delete business objects. |
void |
execute(IContext context)
Executes the current feature with the given context. |
protected java.lang.String |
getDeleteName(IDeleteContext context)
Returns the delete name which will be used for the delete dialog. |
java.lang.String |
getName()
Gets the name. |
protected boolean |
getUserDecision(IDeleteContext context)
Shows a dialog which asks the user to confirm the deletion of one or more elements. |
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. |
void |
postDelete(IDeleteContext context)
Post delete. |
void |
preDelete(IDeleteContext context)
Pre delete. |
private void |
setDoneChanges(boolean doneChanges)
|
| Methods inherited from class org.eclipse.graphiti.features.impl.AbstractFeature |
|---|
addGraphicalRepresentation, canUndo, getAllBusinessObjectsForPictogramElement, getBusinessObjectForPictogramElement, getDescription, getDiagram, getDiagramEditor, getFeatureProvider, getProgressCallback, getUserDecision, isAvailable, layoutPictogramElement, link, link, manageColor, manageColor, 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, isAvailable |
| Methods inherited from interface org.eclipse.graphiti.IDescription |
|---|
getDescription |
| Methods inherited from interface org.eclipse.graphiti.features.IFeatureProviderHolder |
|---|
getFeatureProvider |
| Field Detail |
|---|
private boolean doneChanges
private static final java.lang.String NAME
| Constructor Detail |
|---|
public DefaultDeleteFeature(IFeatureProvider fp)
DefaultDeleteFeature.
fp - the feature provider| Method Detail |
|---|
public boolean canDelete(IDeleteContext context)
IDelete
canDelete in interface IDeletecontext - the context
public void delete(IDeleteContext context)
IDelete
delete in interface IDeletecontext - the contextprotected void deleteBusinessObjects(java.lang.Object[] businessObjects)
businessObjects - the business objectsprotected void deleteBusinessObject(java.lang.Object bo)
bo - the bopublic void preDelete(IDeleteContext context)
IDelete
preDelete in interface IDeletecontext - the contextpublic void postDelete(IDeleteContext context)
IDelete
postDelete in interface IDeletecontext - the contextpublic boolean canExecute(IContext context)
IFeature
canExecute in interface IFeaturecontext - this is the general input for this method
IContextpublic void execute(IContext context)
IFeature
execute in interface IFeaturecontext - this is the general input for this methodIContextpublic java.lang.String getName()
IName
getName in interface INamegetName in class AbstractFeaturepublic boolean hasDoneChanges()
IFeature
IMPORTANT NOTE: The implementor of the feature is responsible for
correctly implementing this method! It will lead to inconsistencies if
this method returns false although the feature did changes.
hasDoneChanges in interface IFeaturehasDoneChanges in class AbstractFeaturetrue if the feature should appear in the undo stack,
false otherwiseprivate void setDoneChanges(boolean doneChanges)
protected boolean getUserDecision(IDeleteContext context)
context - delete context
protected java.lang.String getDeleteName(IDeleteContext context)
context - the delete context
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||