|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
util.ComponentPrinter
public class ComponentPrinter
Implements a simple printing class for an awtin a Thread.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Fields inherited from interface java.awt.print.Pageable |
|---|
UNKNOWN_NUMBER_OF_PAGES |
| Fields inherited from interface java.awt.print.Printable |
|---|
NO_SUCH_PAGE, PAGE_EXISTS |
| Constructor Summary | |
|---|---|
ComponentPrinter(java.awt.Component c)
Creates a new instance of ComponentPrinter with default PageFormat |
|
ComponentPrinter(java.awt.Component c,
java.awt.print.PageFormat format)
Creates a new instance of StringPrinter |
|
| Method Summary | |
|---|---|
int |
getNumberOfPages()
|
java.awt.print.PageFormat |
getPageFormat(int pageIndex)
|
java.awt.print.Printable |
getPrintable(int pageIndex)
|
int |
print(java.awt.Graphics g,
java.awt.print.PageFormat format,
int pageIndex)
renders a page |
void |
run()
prints the Component |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ComponentPrinter(java.awt.Component c)
public ComponentPrinter(java.awt.Component c,
java.awt.print.PageFormat format)
c - the Component to printformat - the PageFormat to use; uses PrinterJob.getPrinterJob().defaultPage()
if null| Method Detail |
|---|
public void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
public java.awt.print.PageFormat getPageFormat(int pageIndex)
throws java.lang.IndexOutOfBoundsException
getPageFormat in interface java.awt.print.Pageablejava.lang.IndexOutOfBoundsException
public int print(java.awt.Graphics g,
java.awt.print.PageFormat format,
int pageIndex)
throws java.awt.print.PrinterException
print in interface java.awt.print.Printableg - the Graphics to render onformat - the PageFormat to use for renderingpageIndex - the page to print
java.awt.print.PrinterException - if the component's print() method doespublic int getNumberOfPages()
getNumberOfPages in interface java.awt.print.Pageable
public java.awt.print.Printable getPrintable(int pageIndex)
throws java.lang.IndexOutOfBoundsException
getPrintable in interface java.awt.print.Pageablejava.lang.IndexOutOfBoundsException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||