Ontimize 5.2072EN

com.ontimize.gui.table
Class PrintableTable

java.lang.Object
  extended bycom.ontimize.gui.table.PrintableTable
All Implemented Interfaces:
java.awt.print.Printable

public class PrintableTable
extends java.lang.Object
implements java.awt.print.Printable

This class wraps a Table and adds the logic necessary to allow the table to be printable, this is, to have the interface to extract the table information.


Field Summary
protected  java.lang.String date
           
protected  java.text.SimpleDateFormat df
           
protected  boolean fitInPage
           
protected static java.lang.String PAGES_READY
           
protected static java.lang.String PREPARING_PRINTING_PAGES
           
protected  int totalWidth
           
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Constructor Summary
PrintableTable(Table t, boolean scaleToFit)
           
 
Method Summary
 void cancelPrinting()
           
 int configurePage()
           
 void dispose()
           
 boolean fitInPage()
           
 boolean fitInPage(int[] columnWidths)
           
 int getAvailableWidth()
           
 java.util.Vector getColumnsToPrintingByOrder()
           
 int getFontSize()
           
 java.awt.print.PageFormat getPageFormat()
           
 int getPagesNumber()
           
 int getTotalWidth()
           
 boolean isPrinting()
           
 void moveColumnLeft(java.lang.Object col)
           
 void moveColumnRight(java.lang.Object col)
           
 boolean print()
           
 int print(java.awt.Graphics g, java.awt.print.PageFormat pf, int pageIndex)
           
 boolean print(java.lang.String jobName)
           
 void setFontSize(int fontSize)
           
 int setPageFormat(java.awt.print.PageFormat pf)
           
 void setPageTitles(java.lang.String t)
           
 void setPaintGrid(boolean paint)
           
 void setPaintRowNumber(boolean paintRowNumber)
           
 void setPrintingColumns(java.util.Vector cols)
           
 void setPrintingColumns(java.util.Vector cols, boolean prepare)
           
 void setRemarkLine(boolean remark)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PAGES_READY

protected static final java.lang.String PAGES_READY
See Also:
Constant Field Values

PREPARING_PRINTING_PAGES

protected static final java.lang.String PREPARING_PRINTING_PAGES
See Also:
Constant Field Values

fitInPage

protected boolean fitInPage

totalWidth

protected int totalWidth

date

protected java.lang.String date

df

protected java.text.SimpleDateFormat df
Constructor Detail

PrintableTable

public PrintableTable(Table t,
                      boolean scaleToFit)
Method Detail

setRemarkLine

public void setRemarkLine(boolean remark)

dispose

public void dispose()
             throws java.lang.Exception
Throws:
java.lang.Exception

cancelPrinting

public void cancelPrinting()

setPageTitles

public void setPageTitles(java.lang.String t)

getPageFormat

public java.awt.print.PageFormat getPageFormat()

setPageFormat

public int setPageFormat(java.awt.print.PageFormat pf)

fitInPage

public boolean fitInPage()

fitInPage

public boolean fitInPage(int[] columnWidths)

getTotalWidth

public int getTotalWidth()

getAvailableWidth

public int getAvailableWidth()

setPaintGrid

public void setPaintGrid(boolean paint)

setPaintRowNumber

public void setPaintRowNumber(boolean paintRowNumber)

getPagesNumber

public int getPagesNumber()

getFontSize

public int getFontSize()

setFontSize

public void setFontSize(int fontSize)

configurePage

public int configurePage()

setPrintingColumns

public void setPrintingColumns(java.util.Vector cols)

setPrintingColumns

public void setPrintingColumns(java.util.Vector cols,
                               boolean prepare)

moveColumnLeft

public void moveColumnLeft(java.lang.Object col)

moveColumnRight

public void moveColumnRight(java.lang.Object col)

getColumnsToPrintingByOrder

public java.util.Vector getColumnsToPrintingByOrder()

isPrinting

public boolean isPrinting()

print

public boolean print(java.lang.String jobName)
              throws java.lang.Exception
Throws:
java.lang.Exception

print

public boolean print()
              throws java.lang.Exception
Throws:
java.lang.Exception

print

public int print(java.awt.Graphics g,
                 java.awt.print.PageFormat pf,
                 int pageIndex)
Specified by:
print in interface java.awt.print.Printable

Ontimize