Class DiagramPrintOptions
java.lang.Object
de.cau.cs.kieler.klighd.ui.printing.PrintOptions
de.cau.cs.kieler.klighd.ui.printing.DiagramPrintOptions
Specialization of
PrintOptions dedicated to diagram printouts.
See PrintOptions for details on this separation.- Author:
- chsch
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classPreference initializer making sure the required data contain valid values. -
Field Summary
Fields inherited from class de.cau.cs.kieler.klighd.ui.printing.PrintOptions
PROPERTY_ALL_PAGES, PROPERTY_CENTER_HORIZONTALLY, PROPERTY_CENTER_VERTICALLY, PROPERTY_COLLATE, PROPERTY_COPIES, PROPERTY_DUPLEX, PROPERTY_ORIENTATION, PROPERTY_PAGES_TALL, PROPERTY_PAGES_WIDE, PROPERTY_PRINTER_DATA, PROPERTY_PRINTER_NAME, PROPERTY_RANGE_FROM, PROPERTY_RANGE_TO, PROPERTY_SCALE_FACTOR, PROPERTY_SCALE_PERCENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanConvenience getter.static booleanConvenience getter.Gets the exporter to use when printing or showing the preview.static booleanConvenience getter.protected voidResets cachedIExportBranding.Triminformation, which is necessary, e.g., after changing the paper format or page orientation.static voidsetAutoScaleTo100(boolean autoScale) Convenience setter.static voidsetAutoScaleToFit(boolean autoScale) Convenience setter.static voidsetInitiallyShowPreview(boolean initiallyShow) Convenience setter.protected Point2DRe-calculates the (x,y) offset being required for aligning the page content centrally and/or vertically, which is necessary, e.g., after changing the paper format or page orientation.Methods inherited from class de.cau.cs.kieler.klighd.ui.printing.PrintOptions
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, getCenteringOffset, getCenteringOffset, getCopies, getDuplex, getHorizontallyCentered, getOrientation, getPagesTall, getPagesWide, getPrinter, getPrinterBounds, getPrinterData, getPrinterDPI, getPrinterName, getPrinterTrim, getPropertyChangeListeners, getPropertyChangeListeners, getRangeFrom, getRangeTo, getScaleFactor, getScalePercent, getVerticallyCentered, hasListeners, isAllPages, isCollate, removePropertyChangeListener, removePropertyChangeListener, restoreFromPreferences, setAllPages, setCollate, setCopies, setDuplex, setHorizontallyCentered, setOrientation, setPagesTall, setPagesWide, setPrinterData, setRangeFrom, setRangeTo, setScaleFactor, setScalePercent, setVerticallyCentered, storeToPreferences
-
Constructor Details
-
DiagramPrintOptions
Constructor.- Parameters:
printExporter- thePrintExporterbeing employed shall be hooked for easy access while, e.g., computing the "Fit to pages" scale
-
-
Method Details
-
getInitiallyShowPreview
public static boolean getInitiallyShowPreview()Convenience getter.- Returns:
truethe print preview is to be shown while opening the print dialog,falseotherwise.
-
setInitiallyShowPreview
public static void setInitiallyShowPreview(boolean initiallyShow) Convenience setter.- Parameters:
initiallyShow-truethe print preview is to be shown while opening the print dialog,falseotherwise.
-
getAutoScaleToFit
public static boolean getAutoScaleToFit()Convenience getter.- Returns:
truethe print should automatically be scaled to fit on one page,falseotherwise.
-
setAutoScaleToFit
public static void setAutoScaleToFit(boolean autoScale) Convenience setter. Automatically makes sure that Scale To Fit and Scale to 100% are not active at the same time.- Parameters:
autoScale-truethe print should automatically be scaled to fit on one page,falseotherwise.
-
getAutoScaleTo100
public static boolean getAutoScaleTo100()Convenience getter.- Returns:
truethe print should automatically be scaled to 100%,falseotherwise.
-
setAutoScaleTo100
public static void setAutoScaleTo100(boolean autoScale) Convenience setter. Automatically makes sure that Scale To Fit and Scale to 100% are not active at the same time.- Parameters:
autoScale-truethe print should automatically be scaled to 100%,falseotherwise.
-
getExporter
Gets the exporter to use when printing or showing the preview.- Returns:
- the exporter
-
resetTrimData
protected void resetTrimData()Resets cachedIExportBranding.Triminformation, which is necessary, e.g., after changing the paper format or page orientation. Must be implemented by subclasses if necessary.- Overrides:
resetTrimDatain classPrintOptions
-
updateCenteringOffset
Description copied from class:PrintOptionsRe-calculates the (x,y) offset being required for aligning the page content centrally and/or vertically, which is necessary, e.g., after changing the paper format or page orientation. Must be implemented by subclasses if necessary.- Overrides:
updateCenteringOffsetin classPrintOptions- Returns:
- a
Point2Ddetermining the (x,y) offset, ornullif not supported
-