|
||||||||||
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 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(Object bo)
Delete business object. |
protected void |
deleteBusinessObjects(Object[] businessObjects)
Delete business objects. |
void |
execute(IContext context)
Executes the current feature with the given context. |
protected String |
getDeleteName(IDeleteContext context)
Returns the delete name which will be used for the delete dialog. |
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 String NAME
Constructor Detail |
---|
public DefaultDeleteFeature(IFeatureProvider fp)
DefaultDeleteFeature
.
fp
- the feature providerMethod Detail |
---|
public boolean canDelete(IDeleteContext context)
IDelete
canDelete
in interface IDelete
context
- the context
public void delete(IDeleteContext context)
IDelete
delete
in interface IDelete
context
- the contextprotected void deleteBusinessObjects(Object[] businessObjects)
businessObjects
- the business objectsprotected void deleteBusinessObject(Object bo)
bo
- the bopublic void preDelete(IDeleteContext context)
IDelete
preDelete
in interface IDelete
context
- the contextpublic void postDelete(IDeleteContext context)
IDelete
postDelete
in interface IDelete
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 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 IFeature
hasDoneChanges
in class AbstractFeature
true
if the feature should appear in the undo stack,
false
otherwiseprivate void setDoneChanges(boolean doneChanges)
protected boolean getUserDecision(IDeleteContext context)
context
- delete context
protected String getDeleteName(IDeleteContext context)
context
- the delete context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |