com.tensegrity.gui.swing.print
Class TableBook

java.lang.Object
  extended byjava.awt.print.Book
      extended bycom.tensegrity.gui.swing.print.TableBook
All Implemented Interfaces:
java.awt.print.Pageable

public class TableBook
extends java.awt.print.Book

The TableBook class extends the java.awt.print.Book class about the possibility to layout the pages of the book in a grid-alike style where you can address pages via a x,y semantic.

Version:
$Id: TableBook.java,v 1.10 2005/01/13 17:19:50 AndreasEbbert Exp $
Author:
Gilles Iachelini

Field Summary
 
Fields inherited from interface java.awt.print.Pageable
UNKNOWN_NUMBER_OF_PAGES
 
Constructor Summary
TableBook()
          Constructor for TableBook.
 
Method Summary
 int getColumnCount()
          Method getColumnCount returns the number of columns in this book.
 int getPageCount()
          Returns the total amount of pages of this book by multiplying getRowCount() with getColumnCount().
 java.awt.print.PageFormat getPageFormat(int pageIndex)
           
 java.awt.print.PageFormat getPageFormat(int row, int colum)
          Returns the PageFormat instance of the given rowxcolumn.
 java.awt.print.Printable getPrintable(int row, int colum)
          Returns the Printable instance of the given rowxcolumn.
 int getRowCount()
          Method getRowCount returns the number of rows of this book.
 void setColumnCount(int columns)
          Method setColumnCount sets the internal column field.
 void setRowCount(int rows)
          Method setRowCount sets the internal row field.
 
Methods inherited from class java.awt.print.Book
append, append, getNumberOfPages, getPrintable, setPage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableBook

public TableBook()
Constructor for TableBook.

Method Detail

setRowCount

public void setRowCount(int rows)
Method setRowCount sets the internal row field. This method doesnt affect the current Book configuration.

Parameters:
rows - The new number of rows of this book.

getRowCount

public int getRowCount()
Method getRowCount returns the number of rows of this book.

Returns:
int

setColumnCount

public void setColumnCount(int columns)
Method setColumnCount sets the internal column field. This method doesnt affect the current Book configuration.

Parameters:
columns - The new number of columns of this book.

getColumnCount

public int getColumnCount()
Method getColumnCount returns the number of columns in this book.

Returns:
int

getPrintable

public java.awt.print.Printable getPrintable(int row,
                                             int colum)
                                      throws java.lang.IndexOutOfBoundsException
Returns the Printable instance of the given rowxcolumn.

Parameters:
row - the row index.
colum - the column index
Returns:
the Printable instance at the position row x column.
Throws:
java.lang.IndexOutOfBoundsException - forwards the exception from the Book.getPrintable(int) call.
See Also:
Book.getPrintable(int)

getPageFormat

public java.awt.print.PageFormat getPageFormat(int row,
                                               int colum)
                                        throws java.lang.IndexOutOfBoundsException
Returns the PageFormat instance of the given rowxcolumn.

Parameters:
row - the row index.
colum - the column index
Returns:
the PageFormat at position row x column.
Throws:
java.lang.IndexOutOfBoundsException - forwards the exception from the Book.getPageFormat(int) call.
See Also:
Book.getPageFormat(int)

getPageCount

public int getPageCount()
Returns the total amount of pages of this book by multiplying getRowCount() with getColumnCount().

Returns:
the number of pages of this book as integer.

getPageFormat

public java.awt.print.PageFormat getPageFormat(int pageIndex)
                                        throws java.lang.IndexOutOfBoundsException
Throws:
java.lang.IndexOutOfBoundsException


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.