com.dlsc.flexgantt.swing.print

## Class PrintSetup

- java.lang.Object
- - com.dlsc.flexgantt.swing.print.PrintSetup

-     public class PrintSetup
      extends Object

  A utility class for specifying the decorative elements of the printout: the header (title and logo), and the footer (left, center, right text). The text used for the footer can include variable names that will be substituted when the Gantt chart gets printed, e.g. date and time, page number.
  Since:
    2.1
  Author:
    Dirk Lemmermann
  See Also:
    `AbstractGanttChart.setPrintSetup(PrintSetup)`, `DualGanttChart.setSecondaryPrintSetup(PrintSetup)`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PrintSetup()` Default constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getCenterFooter()` Returns the (optional) text that gets displayed in the center of the footer.
    `Color` | `getFooterColor()` Returns the color used for the footer in the printout.
    `Font` | `getFooterFont()` Returns the font used for the footer text in the printout.
    `int` | `getFooterHeight()` Returns the height of the footer in pixels.
    `int` | `getHeaderHeight()` Returns the height of the header in pixels.
    `String` | `getLeftFooter()` Returns the (optional) text that gets displayed on the left-hand side of the footer.
    `Image` | `getLogo()` Returns the logo (optional) that will be printed on each page.
    `String` | `getRightFooter()` Returns the (optional) text that gets displayed on the right-hand side of the footer.
    `String` | `getTitle()` Returns the print title, which is shown on each page.
    `Color` | `getTitleColor()` Returns the color used for the title in the printout.
    `Font` | `getTitleFont()` Returns the font used for the title in the printout.
    `int` | `getVerticalGap()` Returns the gap (in pixels) between the header and the main print area, and the main print area and the footer.
    `boolean` | `isFooterVisible()` Determines whether a footer will be shown in the printout.
    `boolean` | `isHeaderVisible()` Determines whether a header will be shown in the printout.
    `void` | `setCenterFooter(String text)` Specifies a text (optional) to be displayed in the center of the footer.
    `void` | `setFooterColor(Color color)` Sets the color used for the footer in the printout.
    `void` | `setFooterFont(Font font)` Sets the font used for the footer in the printout.
    `void` | `setFooterHeight(int height)` Specifies the height of the footer in pixels.
    `void` | `setFooterVisible(boolean v)` Specifies whether the printout should show a footer with a title and / or a logo.
    `void` | `setHeaderHeight(int height)` Specifies the height of the header in pixels.
    `void` | `setHeaderVisible(boolean v)` Specifies whether the printout should show a header with a title and / or a logo.
    `void` | `setLeftFooter(String text)` Specifies a text (optional) to be displayed on the left-hand side of the footer.
    `void` | `setLogo(Image logo)` An optional logo that will be printed on each page.
    `void` | `setRightFooter(String text)` Specifies a text (optional) to be displayed on the right-hand side of the footer.
    `void` | `setTitle(String title)` Specifies a title text to be printed on each page of the printout.
    `void` | `setTitleColor(Color color)` Sets the color used for the title in the printout.
    `void` | `setTitleFont(Font font)` Sets the font used for the title in the printout.
    `void` | `setVerticalGap(int gap)` Sets the gap (in pixels) between the header and the main print area, and the main print area and the footer.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PrintSetup

          public PrintSetup()

      Default constructor.
      Since:
        2.1

  - ### Method Detail

    - #### getCenterFooter

          public String getCenterFooter()

      Returns the (optional) text that gets displayed in the center of the footer.
      Returns:
        the text shown int the center of the footer
      Since:
        2.1

    - #### getLeftFooter

          public String getLeftFooter()

      Returns the (optional) text that gets displayed on the left-hand side of the footer.
      Returns:
        the text shown on the left of the footer
      Since:
        2.1

    - #### getLogo

          public Image getLogo()

      Returns the logo (optional) that will be printed on each page.
      Returns:
        the logo image for printing
      Since:
        2.1

    - #### getRightFooter

          public String getRightFooter()

      Returns the (optional) text that gets displayed on the right-hand side of the footer.
      Returns:
        the text shown on the right of the footer
      Since:
        2.1

    - #### getTitle

          public String getTitle()

      Returns the print title, which is shown on each page.
      Returns:
        the print title
      Since:
        2.1

    - #### isFooterVisible

          public boolean isFooterVisible()

      Determines whether a footer will be shown in the printout.
      Returns:
        TRUE if the footer will be printed
      Since:
        2.1

    - #### isHeaderVisible

          public boolean isHeaderVisible()

      Determines whether a header will be shown in the printout.
      Returns:
        TRUE if the header will be printed
      Since:
        2.1

    - #### setCenterFooter

          public void setCenterFooter(String text)

      Specifies a text (optional) to be displayed in the center of the footer. The variables $USER, $DATE, $TIME, $PAGE_NUMBER, $PAGE_TOTAL can be used for inserting actual values.
      Parameters:
        `text` - the text shown in the center of the footer
      Since:
        2.1

    - #### setFooterVisible

          public void setFooterVisible(boolean v)

      Specifies whether the printout should show a footer with a title and / or a logo.
      Parameters:
        `v` - if TRUE the FOOTER will be shown
      Since:
        2.1

    - #### setHeaderVisible

          public void setHeaderVisible(boolean v)

      Specifies whether the printout should show a header with a title and / or a logo.
      Parameters:
        `v` - if TRUE the header will be shown
      Since:
        2.1

    - #### setLeftFooter

          public void setLeftFooter(String text)

      Specifies a text (optional) to be displayed on the left-hand side of the footer. The variables $USER, $DATE, $TIME, $PAGE_NUMBER, $PAGE_TOTAL can be used for inserting actual values.
      Parameters:
        `text` - the text shown on the left of the footer
      Since:
        2.1

    - #### setLogo

          public void setLogo(Image logo)

      An optional logo that will be printed on each page.
      Parameters:
        `logo` - an image that will be printed on each page
      Since:
        2.1

    - #### setRightFooter

          public void setRightFooter(String text)

      Specifies a text (optional) to be displayed on the right-hand side of the footer. The variables $USER, $DATE, $TIME, $PAGE_NUMBER, $PAGE_TOTAL can be used for inserting actual values.
      Parameters:
        `text` - the text shown on the right of the footer
      Since:
        2.1

    - #### setTitle

          public void setTitle(String title)

      Specifies a title text to be printed on each page of the printout.
      Parameters:
        `title` - the print title
      Since:
        2.1

    - #### getTitleFont

          public Font getTitleFont()

      Returns the font used for the title in the printout.
      Returns:
        the title font
      Since:
        2.1

    - #### setTitleFont

          public void setTitleFont(Font font)

      Sets the font used for the title in the printout.
      Parameters:
        `font` - the title font
      Since:
        2.1

    - #### getTitleColor

          public Color getTitleColor()

      Returns the color used for the title in the printout.
      Returns:
        the title color
      Since:
        2.1

    - #### setTitleColor

          public void setTitleColor(Color color)

      Sets the color used for the title in the printout.
      Parameters:
        `color` - the title color
      Since:
        2.1

    - #### getFooterFont

          public Font getFooterFont()

      Returns the font used for the footer text in the printout.
      Returns:
        the footer font
      Since:
        2.1

    - #### setFooterFont

          public void setFooterFont(Font font)

      Sets the font used for the footer in the printout.
      Parameters:
        `font` - the footer font
      Since:
        2.1

    - #### getFooterColor

          public Color getFooterColor()

      Returns the color used for the footer in the printout.
      Returns:
        the footer color
      Since:
        2.1

    - #### setFooterColor

          public void setFooterColor(Color color)

      Sets the color used for the footer in the printout.
      Parameters:
        `color` - the footer color
      Since:
        2.1

    - #### getHeaderHeight

          public int getHeaderHeight()

      Returns the height of the header in pixels. Default is 50.
      Returns:
        the header height
      Since:
        2.1

    - #### setHeaderHeight

          public void setHeaderHeight(int height)

      Specifies the height of the header in pixels. Default is 50.
      Parameters:
        `height` - the header height
      Since:
        2.1

    - #### getFooterHeight

          public int getFooterHeight()

      Returns the height of the footer in pixels. Default is 20.
      Returns:
        the footer height
      Since:
        2.1

    - #### setFooterHeight

          public void setFooterHeight(int height)

      Specifies the height of the footer in pixels. Default is 20.
      Parameters:
        `height` - the header height
      Since:
        2.1

    - #### getVerticalGap

          public int getVerticalGap()

      Returns the gap (in pixels) between the header and the main print area, and the main print area and the footer.
      Returns:
        the gap in pixels
      Since:
        2.1

    - #### setVerticalGap

          public void setVerticalGap(int gap)

      Sets the gap (in pixels) between the header and the main print area, and the main print area and the footer.
      Parameters:
        `gap` - the gap in pixels
      Since:
        2.1

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.