|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectExportUtilities
public class ExportUtilities
This Class provides some utilities for printing SWING components. Components can be printed to a picture file, to a PDF or to a printer.
| Constructor Summary | |
|---|---|
ExportUtilities()
|
|
| Method Summary | |
|---|---|
static void |
exportPDF(JComponent component,
String filename)
Prints a JComponent to a PDF. |
static void |
exportPicture(JComponent comp,
String name,
String ext)
Creates a picture out of a SWING component. |
static void |
printComponent(Component c)
Print a component with a printer. |
| Methods inherited from class Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExportUtilities()
| Method Detail |
|---|
public static void printComponent(Component c)
c - the component to print
public static void exportPDF(JComponent component,
String filename)
throws IOException
JComponent to a PDF.
component - the component to printfilename - the filename of the PDF (has to end with .pdf)
IOException
public static void exportPicture(JComponent comp,
String name,
String ext)
throws IOException
comp - the component to exportname - the filename of the pictureext - the picture type (the formats supported depend
on platform and java version used)
IOExceptionImageIO.getWriterFormatNames
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||