|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPrintUtilities
A utility class that lets you print an arbitrary component or save as an image in .jpeg or .png format.
The component has to implement the 'Display' interface.
There are only two static functions your can use.
printCompent(Component) to print to paper or .ps file.
printToStream(Component, Type) to save an image file (JPEG or PNG)
eg. PrintUtilities.printComponent(yourComponent)
PrintUtilities.printToStream(yourComponent, "JPEG");
PrintUtilities.printToStream(yourComponent, "PNG");
Field Summary |
Fields inherited from interface java.awt.print.Printable |
NO_SUCH_PAGE, PAGE_EXISTS |
Method Summary | |
static void |
disableDoubleBuffering(java.awt.Component c)
The speed and quality of printing suffers dramatically if any of the containers have double buffering turned on. |
static void |
enableDoubleBuffering(java.awt.Component c)
Re-enables double buffering globally. |
int |
print(java.awt.Graphics g,
java.awt.print.PageFormat pageFormat,
int pageIndex)
Print drawing area components to paper. |
static void |
printComponent(java.awt.Component c)
|
static void |
printToStream(java.awt.Component c,
java.lang.String mimeType)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void printComponent(java.awt.Component c)
public static void printToStream(java.awt.Component c, java.lang.String mimeType)
public int print(java.awt.Graphics g, java.awt.print.PageFormat pageFormat, int pageIndex)
print
in interface java.awt.print.Printable
public static void disableDoubleBuffering(java.awt.Component c)
public static void enableDoubleBuffering(java.awt.Component c)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |