unbbayes.controller
Class PrintTable
java.lang.Object
unbbayes.controller.PrintTable
- All Implemented Interfaces:
- Pageable, Printable
public class PrintTable
- extends Object
- implements Printable, Pageable
Table printing class JTable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tables
protected List tables
owners
protected List owners
pageFormat
protected PageFormat pageFormat
title
protected String title
PrintTable
public PrintTable(List tbs,
List owners,
PageFormat pf)
PrintTable
public PrintTable(List tables,
String title,
PageFormat pageFormat)
print
public int print(Graphics g,
PageFormat pf,
int index)
- Perform the printing here
- Specified by:
print
in interface Printable
getPrintSize
protected Dimension getPrintSize(JTable table,
int positionX,
int positionY)
- Calculate how much of the table will fit on a page without
causing a row or column to be split across two pages
paintTable
protected void paintTable(String title,
JTable table,
Graphics g,
int positionX,
int positionY,
Dimension size)
- Paint / print a portion of the table
getNumberOfPages
public int getNumberOfPages()
- Calculate the number of pages it will take to print the entire table
- Specified by:
getNumberOfPages
in interface Pageable
getPrintable
public Printable getPrintable(int index)
- Specified by:
getPrintable
in interface Pageable
getPageFormat
public PageFormat getPageFormat(int index)
- Specified by:
getPageFormat
in interface Pageable
Copyright © 2001-2010 University of Brasilia - UnB. All Rights Reserved.