|
||||||||||
| 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.AbstractPrintFeature
public abstract class AbstractPrintFeature
Abstract base implementation of a save as image feature.
| Field Summary | |
|---|---|
private static String |
NAME
|
| Constructor Summary | |
|---|---|
AbstractPrintFeature(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 canPrint(IPrintContext). |
boolean |
canPrint(IPrintContext context)
Checks if this feature can execute. |
void |
execute(IContext context)
Executes this print feature by sequentially calling prePrint(IPrintContext), IPrintFeature.print(IPrintContext) and
postPrint(IPrintContext). |
String |
getName()
Returns the name of the print feature, by default "Print" |
boolean |
hasDoneChanges()
Hook method that reports if changes have been done while executing this feature. |
void |
postPrint(IPrintContext context)
Hook method for executing stuff that needs to be done after actually printing a diagram. |
void |
prePrint(IPrintContext context)
Hook method for executing stuff that needs to be done before actually printing a diagram. |
| 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.IPrintFeature |
|---|
print |
| 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 AbstractPrintFeature(IFeatureProvider fp)
fp - The feature provider that created the feature| Method Detail |
|---|
public String getName()
getName in interface INamegetName in class AbstractFeaturepublic final boolean canExecute(IContext context)
canPrint(IPrintContext).
canExecute in interface IFeaturecontext - Context information for printing.
true in case this print feature can be executed,
false otherwise.IContextpublic boolean canPrint(IPrintContext context)
true. Note that the Graphiti framework already
checks the availability of printer in the print action that triggers this
feature.
canPrint in interface IPrintFeaturecontext - Context information for printing.
true in case this print feature can be executed,
false otherwise.public void prePrint(IPrintContext context)
prePrint in interface IPrintFeaturecontext - Context information for printing.public final void execute(IContext context)
prePrint(IPrintContext), IPrintFeature.print(IPrintContext) and
postPrint(IPrintContext). This method will fail in case the
passed context is no IPrintContext.
execute in interface IFeaturecontext - Context information for printing.IContextpublic void postPrint(IPrintContext context)
postPrint in interface IPrintFeaturecontext - Context information for printing.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 | |||||||||