public class DefaultPrintFeature extends AbstractPrintFeature implements IPrintFeature
DiagramEditor
. It relies on an existing GraphicalViewer
showing the diagram to print.Constructor and Description |
---|
DefaultPrintFeature(IFeatureProvider fp)
Creates a new
DefaultPrintFeature . |
Modifier and Type | Method and Description |
---|---|
void |
print(IPrintContext context)
Performs the print operation.
|
canExecute, canPrint, execute, getName, hasDoneChanges, postPrint, prePrint
canUndo, getDescription, getFeatureProvider, isAvailable, manageFont, manageFont, setProgressCallback, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
canPrint, postPrint, prePrint
canExecute, canUndo, execute, hasDoneChanges, isAvailable
getDescription
getFeatureProvider
public DefaultPrintFeature(IFeatureProvider fp)
DefaultPrintFeature
.fp
- The feature provider providing this featurepublic void print(IPrintContext context)
getGraphicalViewer(IPrintContext)
to retrieve the
GraphicalViewer
that already displays the diagram, queries for
PrinterData
to use by calling
getPrinterData(IPrintContext)
and finally uses
#getPrintOperation(Printer, IPrintConfiguration)
to create an
operation to perform the printing. All those methods may be overridden to
change the default behavior, so normally one would not need to override
this method unless the complete sequence needs to changed or the printing
is performed in a completely different scenario.print
in interface IPrintFeature
context
- Context information for printing.