quick.dbtable
Class PrintProperties

java.lang.Object
  extended byquick.dbtable.PrintProperties

public class PrintProperties
extends java.lang.Object

PrintProperties class describes the various print properties which are used during printing quicktable.

  Example
  class MyPrintProperties extends PrintProperties
  {
     public String getHeader()
     {
        return "Audit Summary report\nPage: %1%\n"Sub Page: %2%";
     }

     public String getFooter()
     {
        return null;
     }
  }
 
Example :

Since:
2.0.2

Field Summary
static int LANDSCAPE
           
static int PORTRAIT
           
 
Constructor Summary
PrintProperties()
          creates default print properties for A4 size paper in PORTRAIT mode
PrintProperties(int mode)
          creates default print properties for A4 size paper in a given mode The mode just decides the width & height of the paper, other that it doesn't do any thing.
PrintProperties(int width, int hieght)
          creates default print properties with a given hieght & width, in 1/72nds of an inch
 
Method Summary
 int getBorderHeight()
          the border hieght on the top & bottom of the paper default border height is 72 ( in 1/72nds of an inch, so 1 inch=72)
 int getBorderHieght()
          Deprecated. There is typo error in this method name getBorderHieght(), use the method getBorderHeight() instead the border hieght on the top & bottom of the paper default border height is 72 ( in 1/72nds of an inch, so 1 inch=72)
 int getBorderWidth()
          the border width on the left side & right side of the paper default border width is 72 ( in 1/72nds of an inch, so 1 inch=72)
 java.lang.String getFooter()
          the text that need to be printed on the bottom of the page.
 int getFooterAlign()
          the alignment of footer use SwingUtilities.CENTER use SwingUtilities.RIGHT use SwingUtilities.LEFT
 java.awt.Color getFooterColor()
          the color that should be used for footer
 java.awt.Font getFooterFont()
          the font that should be used for footer
 java.lang.String getHeader()
          the text that need to be printed on the top of the page.
 int getHeaderAlign()
          the alignment of header use SwingUtilities.CENTER use SwingUtilities.RIGHT use SwingUtilities.LEFT
 java.awt.Color getHeaderColor()
          the color that should be used for printing header
 java.awt.Font getHeaderFont()
          the font that should be used for printing header
 int getPaperHeight()
          paper hieght portrait hieght is 792 , for landscape set this to 612
 int getPaperHieght()
          Deprecated. There is typo error in this method name getPaperHieght(), use the method getPaperHeight() instead paper hieght portrait hieght is 792 , for landscape set this to 612
 int getPaperWidth()
          paper Width default portrait width is 612 , for landscape set this to 792
 boolean printBorder()
          By default a border is printed around the table If you do not need the border, return false
 boolean printTableHeader()
          If you do not want to print the table header return false By default table header printing is enabled
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LANDSCAPE

public static final int LANDSCAPE
See Also:
Constant Field Values

PORTRAIT

public static final int PORTRAIT
See Also:
Constant Field Values
Constructor Detail

PrintProperties

public PrintProperties()
creates default print properties for A4 size paper in PORTRAIT mode


PrintProperties

public PrintProperties(int mode)
creates default print properties for A4 size paper in a given mode The mode just decides the width & height of the paper, other that it doesn't do any thing. While printing the user has to select the lanscape or portrait mode based on the paper


PrintProperties

public PrintProperties(int width,
                       int hieght)
creates default print properties with a given hieght & width, in 1/72nds of an inch

Method Detail

getPaperHieght

public int getPaperHieght()
Deprecated. There is typo error in this method name getPaperHieght(), use the method getPaperHeight() instead paper hieght portrait hieght is 792 , for landscape set this to 612

See Also:
getPaperHeight()

getPaperHeight

public int getPaperHeight()
paper hieght portrait hieght is 792 , for landscape set this to 612


getPaperWidth

public int getPaperWidth()
paper Width default portrait width is 612 , for landscape set this to 792


getBorderWidth

public int getBorderWidth()
the border width on the left side & right side of the paper default border width is 72 ( in 1/72nds of an inch, so 1 inch=72)


getBorderHieght

public int getBorderHieght()
Deprecated. There is typo error in this method name getBorderHieght(), use the method getBorderHeight() instead the border hieght on the top & bottom of the paper default border height is 72 ( in 1/72nds of an inch, so 1 inch=72)

See Also:
getBorderHeight()

getBorderHeight

public int getBorderHeight()
the border hieght on the top & bottom of the paper default border height is 72 ( in 1/72nds of an inch, so 1 inch=72)


getHeader

public java.lang.String getHeader()
the text that need to be printed on the top of the page.
 The newline charcter will split the text into multiple lines.
 If you want to dynamically assign the page number within the text
 use the following
   Main page number - %1%
   Sub page number - %2%   If the table width doesn't fit into one page
                           it will be split into multiple pages, sub page denotes that pages.
 Example
    "Audit Summary report\nPage: %1%\n"Sub Page: %2%"

  If you don't want to set a header return null
 


getFooter

public java.lang.String getFooter()
the text that need to be printed on the bottom of the page.
 The newline charcter will split the text into multiple lines.
 If you want to dynamically assign the page number within the text
 use the following
   Main page number - %1%
   Sub page number - %2%
 Example
    "Page: %1% - %2%"

  If you don't want to set a footer return null

 


getHeaderFont

public java.awt.Font getHeaderFont()
the font that should be used for printing header


getFooterFont

public java.awt.Font getFooterFont()
the font that should be used for footer


getHeaderAlign

public int getHeaderAlign()
the alignment of header use SwingUtilities.CENTER use SwingUtilities.RIGHT use SwingUtilities.LEFT


getFooterAlign

public int getFooterAlign()
the alignment of footer use SwingUtilities.CENTER use SwingUtilities.RIGHT use SwingUtilities.LEFT


getHeaderColor

public java.awt.Color getHeaderColor()
the color that should be used for printing header


getFooterColor

public java.awt.Color getFooterColor()
the color that should be used for footer


printTableHeader

public boolean printTableHeader()
If you do not want to print the table header return false By default table header printing is enabled


printBorder

public boolean printBorder()
By default a border is printed around the table If you do not need the border, return false