unbbayes.controller
Class PrintText
java.lang.Object
unbbayes.controller.PrintText
- All Implemented Interfaces:
- Pageable, Printable
public class PrintText
- extends Object
- implements Printable, Pageable
JTextArea
printing class
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
texto
protected JTextArea texto
pageFormat
protected PageFormat pageFormat
PrintText
public PrintText(JTextArea texto,
PageFormat pf)
print
public int print(Graphics g,
PageFormat pf,
int index)
- Perform the printing here
- Specified by:
print
in interface Printable
getPrintSize
protected Dimension getPrintSize(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
paintText
protected void paintText(Graphics g,
int positionX,
int positionY,
Dimension size)
- Paint / print a portion of the text
getNumberOfPages
public int getNumberOfPages()
- Calculate the number of pages it will take to print the entire text
- 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.