FreeHEP API
Version current

org.freehep.swing.print.table
Interface PrintableTableModel

All Known Implementing Classes:
PrintModelAdapter

public interface PrintableTableModel

Used to provide table data for printing

Source Code:
PrintableTableModel.java

Method Summary
 CellPrinter getCellPrinter(int column)
          Get the cell printer to be used for the table body
 CellPrinter getHeaderPrinter(int column)
          Get the cell printer to be used for the table header
 String getTitle()
          Get the title for the document
 Object headerForColumn(int i)
          Get the header for a column
 boolean hideColumn(int i)
          Allows some columns to be skipped when printing
 int numberOfColumns()
          Total number of columns (including hidden columns)
 int numberOfRows()
          Total number of rows
 Object valueAt(int i, int j)
          Get the data to be printed in a certain cell.
 

Method Detail

getCellPrinter

public CellPrinter getCellPrinter(int column)
Get the cell printer to be used for the table body

Parameters:
column - The column index
Returns:
The cell printer for this column

getHeaderPrinter

public CellPrinter getHeaderPrinter(int column)
Get the cell printer to be used for the table header

Parameters:
column - The column index
Returns:
The cell printer to use for this column's header

getTitle

public String getTitle()
Get the title for the document

Returns:
The title.

headerForColumn

public Object headerForColumn(int i)
Get the header for a column

Parameters:
i - The column index.
Returns:
The header text for this column

hideColumn

public boolean hideColumn(int i)
Allows some columns to be skipped when printing

Parameters:
i - The column index
Returns:
true if this column should be skipped

numberOfColumns

public int numberOfColumns()
Total number of columns (including hidden columns)

Returns:
The number of columns

numberOfRows

public int numberOfRows()
Total number of rows

Returns:
The number of rows

valueAt

public Object valueAt(int i,
                      int j)
Get the data to be printed in a certain cell.

Parameters:
i - The column index
j - The row index
Returns:
The object representing the data at the referenced cell

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.