|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.uifextras.printing.PrintableDocument
public final class PrintableDocument
Instances of PrintableDocument are printed by the PrintManager.
PrintManager
Field Summary |
---|
Fields inherited from interface java.awt.print.Printable |
---|
NO_SUCH_PAGE, PAGE_EXISTS |
Constructor Summary | |
---|---|
PrintableDocument(Component component,
boolean centerOutput)
Constructs a printable document for the given component, centered or not. |
|
PrintableDocument(String header,
Component component,
boolean centerOutput)
Constructs a printable document for the given component, using the specified string header and centered property. |
Method Summary | |
---|---|
static PrintableDocument |
createFrom(ExtTable table)
Creates and returns a PrintableDocument from
the given extended table - that implicitly includes alignment data. |
static PrintableDocument |
createFrom(TableModel model,
int[] alignments)
Creates and returns a PrintableDocument from
the given table model and alignments array. |
static PrintableDocument |
createFrom(URL url)
Creates and returns a PrintableDocument from the
text that is located at the specified URL . |
boolean |
getCenterOutput()
|
Component |
getComponent()
|
String |
getJobName()
|
void |
print()
Prints this printable document via the PrintManager . |
int |
print(Graphics g,
PageFormat pf,
int pageIndex)
|
void |
printWithDialog()
Prints this printable document via the PrintManager . |
void |
setFooter(String footer)
Sets a string footer that is repeated on each page. |
void |
setHeader(String header)
Sets a string header that is repeated on each page. |
void |
setJobName(String jobName)
Sets a job name, that may be used by the OS or printer engine. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrintableDocument(Component component, boolean centerOutput)
public PrintableDocument(String header, Component component, boolean centerOutput)
Method Detail |
---|
public static PrintableDocument createFrom(URL url)
PrintableDocument
from the
text that is located at the specified URL
.
public static PrintableDocument createFrom(TableModel model, int[] alignments)
PrintableDocument
from
the given table model and alignments array.
public static PrintableDocument createFrom(ExtTable table)
PrintableDocument
from
the given extended table - that implicitly includes alignment data.
public boolean getCenterOutput()
public Component getComponent()
public void setHeader(String header)
public void setFooter(String footer)
public String getJobName()
public void setJobName(String jobName)
public void print()
PrintManager
.
public void printWithDialog()
PrintManager
.
Opens a print dialog before, to allow the user to select a printer.
public int print(Graphics g, PageFormat pf, int pageIndex)
print
in interface Printable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |