Class DiagramPrintOptions

java.lang.Object
de.cau.cs.kieler.klighd.ui.printing.PrintOptions
de.cau.cs.kieler.klighd.ui.printing.DiagramPrintOptions

public class DiagramPrintOptions extends PrintOptions
Specialization of PrintOptions dedicated to diagram printouts. See PrintOptions for details on this separation.
Author:
chsch
  • Constructor Details

    • DiagramPrintOptions

      public DiagramPrintOptions(PrintExporter printExporter)
      Constructor.
      Parameters:
      printExporter - the PrintExporter being 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:
      true the print preview is to be shown while opening the print dialog, false otherwise.
    • setInitiallyShowPreview

      public static void setInitiallyShowPreview(boolean initiallyShow)
      Convenience setter.
      Parameters:
      initiallyShow - true the print preview is to be shown while opening the print dialog, false otherwise.
    • getAutoScaleToFit

      public static boolean getAutoScaleToFit()
      Convenience getter.
      Returns:
      true the print should automatically be scaled to fit on one page, false otherwise.
    • 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 - true the print should automatically be scaled to fit on one page, false otherwise.
    • getAutoScaleTo100

      public static boolean getAutoScaleTo100()
      Convenience getter.
      Returns:
      true the print should automatically be scaled to 100%, false otherwise.
    • 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 - true the print should automatically be scaled to 100%, false otherwise.
    • getExporter

      public PrintExporter getExporter()
      Gets the exporter to use when printing or showing the preview.
      Returns:
      the exporter
    • resetTrimData

      protected void resetTrimData()
      Resets cached IExportBranding.Trim information, which is necessary, e.g., after changing the paper format or page orientation. Must be implemented by subclasses if necessary.
      Overrides:
      resetTrimData in class PrintOptions
    • updateCenteringOffset

      protected Point2D updateCenteringOffset()
      Description copied from class: PrintOptions
      Re-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:
      updateCenteringOffset in class PrintOptions
      Returns:
      a Point2D determining the (x,y) offset, or null if not supported