|
||||||||||
| 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.AbstractSaveImageFeature
public abstract class AbstractSaveImageFeature
Abstract base implementation of a save as image feature.
| Field Summary | |
|---|---|
private static String |
NAME
|
| Constructor Summary | |
|---|---|
AbstractSaveImageFeature(IFeatureProvider fp)
Constructor that is to be called by any subclass. |
|
| Method Summary | |
|---|---|
boolean |
canExecute(IContext context)
Checks if this feature can be executed by delegating to the method canSave(ISaveImageContext). |
boolean |
canSave(ISaveImageContext context)
Checks if this feature can execute. |
void |
execute(IContext context)
Executes this save image feature by sequentially calling preSave(ISaveImageContext), ISaveImageFeature.save(ISaveImageContext) and
postSave(ISaveImageContext). |
String |
getName()
Returns the name of the save as image feature, by default "Save As Image" |
boolean |
hasDoneChanges()
Hook method that reports if changes have been done while executing this feature. |
void |
postSave(ISaveImageContext context)
Hook method for executing stuff that needs to be done after actually saving a diagram as an image. |
void |
preSave(ISaveImageContext context)
Hook method for executing stuff that needs to be done before actually saving a diagram as an image. |
| Methods inherited from class org.eclipse.graphiti.features.impl.AbstractFeature |
|---|
addGraphicalRepresentation, canUndo, getAllBusinessObjectsForPictogramElement, getBusinessObjectForPictogramElement, getDescription, getDiagram, getDiagramBehavior, getFeatureProvider, getProgressCallback, getUserDecision, 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.ISaveImageFeature |
|---|
save |
| 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 static final String NAME
| Constructor Detail |
|---|
public AbstractSaveImageFeature(IFeatureProvider fp)
fp - The feature provider that created the feature| Method Detail |
|---|
public String getName()
getName in interface INamegetName in class AbstractFeaturepublic boolean canExecute(IContext context)
canSave(ISaveImageContext).
canExecute in interface IFeaturecontext - Context information for printing.
true in case this save image feature can be
executed, false otherwise.IContextpublic boolean canSave(ISaveImageContext context)
true.
canSave in interface ISaveImageFeaturecontext - Context information for saving an image.
true in case this save image feature can be
executed, false otherwise.public void preSave(ISaveImageContext context)
preSave in interface ISaveImageFeaturecontext - Context information for saving.public final void execute(IContext context)
preSave(ISaveImageContext), ISaveImageFeature.save(ISaveImageContext) and
postSave(ISaveImageContext). This method will fail in case the
passed context is no ISaveImageContext.
execute in interface IFeaturecontext - Context information for saving.IContextpublic void postSave(ISaveImageContext context)
postSave in interface ISaveImageFeaturecontext - Context information for saving.public boolean hasDoneChanges()
false is returned the feature will not
appear in the undo stack. The default implementation simply returns
false.
hasDoneChanges in interface IFeaturehasDoneChanges in class AbstractFeaturetrue in case changes have been made,
false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||