com.ontimize.gui.table
Class PrintableTable
java.lang.Object
com.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.
| Fields inherited from interface java.awt.print.Printable |
NO_SUCH_PAGE, PAGE_EXISTS |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
PrintableTable
public PrintableTable(Table t,
boolean scaleToFit)
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