Class SpreadSheet

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, SizeOfHandler, PdfProclet, PdfProcletWithAbsolutePosition, PdfProcletWithFilenameOutput, PdfProcletWithOptionalAbsolutePosition, PdfProcletWithPageBreaks, PdfProcletWithVariableFileExtension, Serializable

    public class SpreadSheet
    extends AbstractSpreadSheetPdfProclet
    Adds CSV files (or any spreadsheet files that is supported) as table.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -regexp-filename <adams.core.base.BaseRegExp> (property: regExpFilename)
        The regular expression that the filename must match.
        default: .*
        more: https://docs.oracle.com/javase/tutorial/essential/regex/
        https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html
     
    -add-filename <boolean> (property: addFilename)
        Whether to add the file name before the actual file content as separate
        paragraph.
        default: false
     
    -font-filename <adams.core.io.PdfFont> (property: fontFilename)
        The font to use for printing the file name header.
        default: Helvetica-Bold-12
     
    -color-filename <java.awt.Color> (property: colorFilename)
        The color to use for printing the file name header.
        default: #000000
     
    -page-break-before <boolean> (property: pageBreakBefore)
        If true, then a page-break is added before the content of the file is inserted.
        default: false
     
    -page-break-after <boolean> (property: pageBreakAfter)
        If true, then a page-break is added after the content of the file is inserted.
        default: false
     
    -num-files <int> (property: numFilesPerPage)
        The number of files to put on a page before adding an automatic page break;
         use -1 for unlimited.
        default: -1
        minimum: -1
     
    -font-table-header <adams.core.io.PdfFont> (property: fontTableHeader)
        The font to use for the table header.
        default: Helvetica-Bold-12
     
    -color-table-header <java.awt.Color> (property: colorTableHeader)
        The color to use for the table header.
        default: #000000
     
    -background-table-header <java.awt.Color> (property: backgroundTableHeader)
        The background color to use for the table header.
        default: #c0c0c0
     
    -font-general-content <adams.core.io.PdfFont> (property: fontGeneralContent)
        The font to use for non-numeric content in the table.
        default: Helvetica-Normal-12
     
    -color-general-content <java.awt.Color> (property: colorGeneralContent)
        The color to use for general content.
        default: #000000
     
    -font-numeric-content <adams.core.io.PdfFont> (property: fontNumericContent)
        The font to use for numeric content in the table.
        default: Helvetica-Normal-12
     
    -color-numeric-content <java.awt.Color> (property: colorNumericContent)
        The color to use for numeric content.
        default: #000000
     
    -num-decimals <int> (property: numDecimals)
        The number of decimals for numeric values in the table.
        default: 1
        minimum: 0
     
    -extension <adams.core.base.BaseString> [-extension ...] (property: extensions)
        The file extension(s) that the processor will be used for.
        default: csv
     
    -reader <adams.data.io.input.SpreadSheetReader> (property: reader)
        The reader to use for loading the spreadsheet files.
        default: adams.data.io.input.CsvSpreadSheetReader -data-row-type adams.data.spreadsheet.DenseDataRow -spreadsheet-type adams.data.spreadsheet.DefaultSpreadSheet
     
    -width-percentage <float> (property: widthPercentage)
        The percentage of the page width to occupy.
        default: 100.0
        minimum: 0.0
        maximum: 100.0
     
    -horizontal-alignment <LEFT|CENTER|RIGHT> (property: horizontalAlignment)
        How to align the table on the page horizontally when not 100% wide.
        default: CENTER
     
    -use-absolute-position <boolean> (property: useAbsolutePosition)
        If enabled, the absolute position is used (from bottom-left corner).
        default: false
     
    -x <float> (property: X)
        The absolute X position.
        default: 0.0
        minimum: 0.0
     
    -y <float> (property: Y)
        The absolute Y position.
        default: 0.0
        minimum: 0.0
     
    -rel-col-width <adams.core.base.BaseFloat> [-rel-col-width ...] (property: relativeColumnWidths)
        The relative column widths (0-1), ignored if not provided, uses 1 by default.
        default:
     
    -add-comments <boolean> (property: addComments)
        If enabled, the spreadsheet comments (if any) get added before the table.
        default: false
     
    -font-comments <adams.core.io.PdfFont> (property: fontComments)
        The font to use for the comments.
        default: Helvetica-Italic-12
     
    -color-comments <java.awt.Color> (property: colorComments)
        The color to use for the comments.
        default: #404040
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_AddComments

        protected boolean m_AddComments
        whether to add the comments.
      • m_FontComments

        protected PdfFont m_FontComments
        the font for the comments.
      • m_ColorComments

        protected Color m_ColorComments
        the color for the comments.
    • Constructor Detail

      • SpreadSheet

        public SpreadSheet()
    • Method Detail

      • setAddComments

        public void setAddComments​(boolean value)
        Sets whether to add the comments.
        Parameters:
        value - true if to add
      • getAddComments

        public boolean getAddComments()
        Returns whether to add the comments.
        Returns:
        true if to add
      • addCommentsTipText

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

        public void setFontComments​(PdfFont value)
        Sets the font to use for the comments.
        Parameters:
        value - the font
      • getFontComments

        public PdfFont getFontComments()
        Returns the font to use for the comments.
        Returns:
        the font
      • fontCommentsTipText

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

        public void setColorComments​(Color value)
        Sets the color to use for the comments.
        Parameters:
        value - the color
      • getColorComments

        public Color getColorComments()
        Returns the color to use for the comments.
        Returns:
        the color
      • colorCommentsTipText

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