|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjsky.util.gui.PrintUtil
public class PrintUtil
Utility class for displaying a print dialog to print a Printable object. This class uses a platform independent dialog and remembers the printer name and settings between sessions.
Constructor Summary | |
---|---|
PrintUtil(java.awt.print.Printable p)
Initialize with the Printable and the title |
|
PrintUtil(java.awt.print.Printable p,
java.lang.String title)
Initialize with the Printable and the title |
Method Summary | |
---|---|
ProgressPanel |
getProgressPanel()
Return the panel used to display print progress. |
void |
print()
Prints the contents of the target Printable. |
static void |
print(java.awt.print.Printable p)
Display a dialog to print the given Printable |
static void |
print(java.awt.print.Printable p,
java.lang.String title)
Display a dialog to print the given Printable with the given title |
void |
print(java.lang.String title)
Prints the contents of the target Printable. |
void |
setAttribute(javax.print.attribute.Attribute attr)
Set the default value for the given attribute. |
void |
setTitle(java.lang.String title)
Sets the title to be printed before the table contents. |
void |
setUseBgThread(boolean b)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrintUtil(java.awt.print.Printable p)
public PrintUtil(java.awt.print.Printable p, java.lang.String title)
Method Detail |
---|
public ProgressPanel getProgressPanel()
public static void print(java.awt.print.Printable p, java.lang.String title)
public static void print(java.awt.print.Printable p)
public void setTitle(java.lang.String title)
title
- title to print before the tablepublic void setAttribute(javax.print.attribute.Attribute attr)
OrientationRequested
.LANDSCAPE
public void setUseBgThread(boolean b)
public void print(java.lang.String title) throws java.awt.print.PrinterException
title
- the title for printing
java.awt.print.PrinterException
- thrown if any print-related errors occurpublic void print() throws java.awt.print.PrinterException
java.awt.print.PrinterException
- thrown if any print-related errors occur
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |