Class PDFWriter

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, SizeOfHandler, Serializable

    public class PDFWriter
    extends BufferedImageBasedWriter
    Outputs PDF documents.

    Valid options are:

    -D (property: debug)
        If set to true, scheme may output additional info to the console.
     
    -file <adams.core.io.PlaceholderFile> (property: file)
        The file to save the image to.
        default: .
     
    -scaling (property: scalingEnabled)
        If set to true, then scaling will be used.
     
    -scale-x <double> (property: XScale)
        The scaling factor for the X-axis.
        default: 1.0
     
    -scale-y <double> (property: YScale)
        The scaling factor for the Y axis.
        default: 1.0
     
    -custom-dimensions (property: useCustomDimensions)
        Whether to use custom dimensions or use the component's ones.
     
    -custom-width <int> (property: customWidth)
        The custom width.
        default: -1
     
    -custom-height <int> (property: customHeight)
        The custom height.
        default: -1
     
    -background <java.awt.Color> (property: background)
        The background color.
        default: #ffffff
     
    -type <RGB|GRAY> (property: type)
        The type of image to create.
        default: RGB
     
    -rotation <int> (property: imageRotation)
        The degrees to rotate the images by (0-360).
        default: 0
     
    -scale <double> (property: imageScale)
        The scale factor (0-1) for images based on the page size.
        default: 0.9
     


    Based on weka.gui.visualize.PDFWriter
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_ImageRotation

        protected int m_ImageRotation
        the degrees to rotate images.
      • m_ImageScale

        protected double m_ImageScale
        the percentage (0-1) to scale the images to.
    • Constructor Detail

      • PDFWriter

        public PDFWriter()
    • Method Detail

      • getDescription

        public String getDescription()
        returns the name of the writer, to display in the FileChooser.
        Specified by:
        getDescription in class JComponentWriter
        Returns:
        the name of the writer
      • getExtensions

        public String[] getExtensions()
        returns the extensions (incl. ".") of the output format, to use in the FileChooser.
        Specified by:
        getExtensions in class JComponentWriter
        Returns:
        the file extensions
      • setImageRotation

        public void setImageRotation​(int value)
        Sets the degrees to rotate the image by.
        Parameters:
        value - the degrees
      • getImageRotation

        public int getImageRotation()
        Returns the degrees by which to rotate the images.
        Returns:
        the degrees
      • imageRotationTipText

        public String imageRotationTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setImageScale

        public void setImageScale​(double value)
        Sets the scale factor (0-1) for images based on the page size.
        Parameters:
        value - the scale factor
      • getImageScale

        public double getImageScale()
        Returns the scale factor (0-1) for images based on the page size.
        Returns:
        the scale factor
      • imageScaleTipText

        public String imageScaleTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.