|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.print.Printout
public class Printout
A print engine for printing pages
Copyright (c) Formaria Ltd., 2008, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Formaria.
$Revision: 1.3 $
| Field Summary | |
|---|---|
static int |
CENTER
Position the header or footer to the center of the page |
static int |
LEFT
Position the header or footer to the left of the page |
static int |
RIGHT
Position the header or footer to the right of the page |
| Constructor Summary | |
|---|---|
Printout()
Create a new printout |
|
Printout(java.awt.print.Paper paper)
Create a new printout |
|
| Method Summary | |
|---|---|
void |
addFrame(PrintableFrameSet frameset)
Add a frameset to the printout. |
void |
addPage(java.awt.Container page)
Add a page or container to the book being printed |
static java.awt.print.PageFormat |
getDefaultPage()
Get the default page format |
java.lang.String |
getHeaderStyle()
Get the style used in the header and footer |
void |
print()
Initiate the printing |
int |
printDecoration(java.awt.Graphics2D g,
java.awt.print.PageFormat pf,
boolean top,
int position,
double x,
double y,
java.awt.FontMetrics fm)
Print the header or footer decorations for the document |
void |
setFooter(java.lang.Object text,
int position)
Set the footer |
void |
setHeader(java.lang.Object text,
int position)
Set the header |
void |
setHeaderStyle(java.lang.String styleName)
Set the style used for the headers and footers |
void |
setJobName(java.lang.String name)
Set the name that will appear in the operating system task list |
void |
setPageNumbers(boolean top,
int position,
java.lang.String format)
Set the name that will appear in the operating system task list |
java.awt.print.PageFormat |
showPageFormat()
Show the page format dialog. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LEFT
public static final int CENTER
public static final int RIGHT
| Constructor Detail |
|---|
public Printout()
public Printout(java.awt.print.Paper paper)
paper - the paper specification for this printout| Method Detail |
|---|
public static java.awt.print.PageFormat getDefaultPage()
public void addPage(java.awt.Container page)
page - the page or contentpublic void addFrame(PrintableFrameSet frameset)
frameset - the framesetpublic java.awt.print.PageFormat showPageFormat()
public void print()
public void setJobName(java.lang.String name)
name - the job name
public void setHeader(java.lang.Object text,
int position)
text - the header textposition - the text postition
public void setFooter(java.lang.Object text,
int position)
text - the header textposition - the text postition
public void setPageNumbers(boolean top,
int position,
java.lang.String format)
top - true to add the page numbers to the header, false for the footerposition - the text postitionformat - the page number format
public int printDecoration(java.awt.Graphics2D g,
java.awt.print.PageFormat pf,
boolean top,
int position,
double x,
double y,
java.awt.FontMetrics fm)
g - the graphics contextpf - the page setuptop - true for header objectsposition - the poition withing the header/footerx - the x starting position of the decorationy - the y starting position of the decorationfm - the font metriucs of the header/footer font
public void setHeaderStyle(java.lang.String styleName)
styleName - the style namepublic java.lang.String getHeaderStyle()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||