|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.report.util.PageFormatFactory
The PageFormatFactory is used to create PageFormats on a higher level. The Factory contains templates for all PageSizes defined by Adobe:
Usage for creating an printjob on A4 paper with 2.5 cm border:
Paper paper = PageFormatFactory.createPaper (PageFormatFactory.A4);
PageFormatFactory.setBordersMm (paper, 25, 25, 25, 25);
PageFormat format = PageFormatFactory.createPageFormat (paper, PageFormat.PORTRAIT);
Field Summary | |
static int[] |
A0
A standard paper size. |
static int[] |
A1
A standard paper size. |
static int[] |
A10
A standard paper size. |
static int[] |
A2
A standard paper size. |
static int[] |
A3
A standard paper size. |
static int[] |
A3_EXTRA
A standard paper size. |
static int[] |
A3_EXTRATRANSVERSE
A standard paper size. |
static int[] |
A3_ROTATED
A standard paper size. |
static int[] |
A3_TRANSVERSE
A standard paper size. |
static int[] |
A4
A standard paper size. |
static int[] |
A4_EXTRA
A standard paper size. |
static int[] |
A4_PLUS
A standard paper size. |
static int[] |
A4_ROTATED
A standard paper size. |
static int[] |
A4_SMALL
A standard paper size. |
static int[] |
A4_TRANSVERSE
A standard paper size. |
static int[] |
A5
A standard paper size. |
static int[] |
A5_EXTRA
A standard paper size. |
static int[] |
A5_ROTATED
A standard paper size. |
static int[] |
A5_TRANSVERSE
A standard paper size. |
static int[] |
A6
A standard paper size. |
static int[] |
A6_ROTATED
A standard paper size. |
static int[] |
A7
A standard paper size. |
static int[] |
A8
A standard paper size. |
static int[] |
A9
A standard paper size. |
static int[] |
ANSIC
A standard paper size. |
static int[] |
ANSID
A standard paper size. |
static int[] |
ANSIE
A standard paper size. |
static int[] |
ARCHA
A standard paper size. |
static int[] |
ARCHB
A standard paper size. |
static int[] |
ARCHC
A standard paper size. |
static int[] |
ARCHD
A standard paper size. |
static int[] |
ARCHE
A standard paper size. |
static int[] |
B0
A standard paper size. |
static int[] |
B1
A standard paper size. |
static int[] |
B10
A standard paper size. |
static int[] |
B2
A standard paper size. |
static int[] |
B3
A standard paper size. |
static int[] |
B4
A standard paper size. |
static int[] |
B4_ROTATED
A standard paper size. |
static int[] |
B5
A standard paper size. |
static int[] |
B5_ROTATED
A standard paper size. |
static int[] |
B5_TRANSVERSE
A standard paper size. |
static int[] |
B6
A standard paper size. |
static int[] |
B6_ROTATED
A standard paper size. |
static int[] |
B7
A standard paper size. |
static int[] |
B8
A standard paper size. |
static int[] |
B9
A standard paper size. |
static int[] |
C4
A standard paper size. |
static int[] |
C5
A standard paper size. |
static int[] |
C6
A standard paper size. |
static int[] |
COMM10
A standard paper size. |
static int[] |
DL
A standard paper size. |
static int |
DOTS_PER_INCH
Constant for dots per inch. |
static int[] |
DOUBLEPOSTCARD
A standard paper size. |
static int[] |
DOUBLEPOSTCARD_ROTATED
A standard paper size. |
static int[] |
ENV10
A standard paper size. |
static int[] |
ENV11
A standard paper size. |
static int[] |
ENV12
A standard paper size. |
static int[] |
ENV14
A standard paper size. |
static int[] |
ENV9
A standard paper size. |
static int[] |
ENVC0
A standard paper size. |
static int[] |
ENVC1
A standard paper size. |
static int[] |
ENVC2
A standard paper size. |
static int[] |
ENVC3
A standard paper size. |
static int[] |
ENVC4
A standard paper size. |
static int[] |
ENVC5
A standard paper size. |
static int[] |
ENVC6
A standard paper size. |
static int[] |
ENVC65
A standard paper size. |
static int[] |
ENVC7
A standard paper size. |
static int[] |
ENVCHOU3
A standard paper size. |
static int[] |
ENVCHOU3_ROTATED
A standard paper size. |
static int[] |
ENVCHOU4
A standard paper size. |
static int[] |
ENVCHOU4_ROTATED
A standard paper size. |
static int[] |
ENVDL
A standard paper size. |
static int[] |
ENVELOPE
A standard paper size. |
static int[] |
ENVINVITE
A standard paper size. |
static int[] |
ENVISOB4
A standard paper size. |
static int[] |
ENVISOB5
A standard paper size. |
static int[] |
ENVISOB6
A standard paper size. |
static int[] |
ENVITALIAN
A standard paper size. |
static int[] |
ENVKAKU2
A standard paper size. |
static int[] |
ENVKAKU2_ROTATED
A standard paper size. |
static int[] |
ENVKAKU3
A standard paper size. |
static int[] |
ENVKAKU3_ROTATED
A standard paper size. |
static int[] |
ENVMONARCH
A standard paper size. |
static int[] |
ENVPERSONAL
A standard paper size. |
static int[] |
ENVPRC1
A standard paper size. |
static int[] |
ENVPRC1_ROTATED
A standard paper size. |
static int[] |
ENVPRC10
A standard paper size. |
static int[] |
ENVPRC10_ROTATED
A standard paper size. |
static int[] |
ENVPRC2
A standard paper size. |
static int[] |
ENVPRC2_ROTATED
A standard paper size. |
static int[] |
ENVPRC3
A standard paper size. |
static int[] |
ENVPRC3_ROTATED
A standard paper size. |
static int[] |
ENVPRC4
A standard paper size. |
static int[] |
ENVPRC4_ROTATED
A standard paper size. |
static int[] |
ENVPRC5
A standard paper size. |
static int[] |
ENVPRC5_ROTATED
A standard paper size. |
static int[] |
ENVPRC6
A standard paper size. |
static int[] |
ENVPRC6_ROTATED
A standard paper size. |
static int[] |
ENVPRC7
A standard paper size. |
static int[] |
ENVPRC7_ROTATED
A standard paper size. |
static int[] |
ENVPRC8
A standard paper size. |
static int[] |
ENVPRC8_ROTATED
A standard paper size. |
static int[] |
ENVPRC9
A standard paper size. |
static int[] |
ENVPRC9_ROTATED
A standard paper size. |
static int[] |
ENVYOU4
A standard paper size. |
static int[] |
ENVYOU4_ROTATED
A standard paper size. |
static int[] |
EXECUTIVE
A standard paper size. |
static int[] |
FANFOLDGERMAN
A standard paper size. |
static int[] |
FANFOLDGERMANLEGAL
A standard paper size. |
static int[] |
FANFOLDUS
A standard paper size. |
static int[] |
FOLIO
A standard paper size. |
static int[] |
ISOB0
A standard paper size. |
static int[] |
ISOB1
A standard paper size. |
static int[] |
ISOB10
A standard paper size. |
static int[] |
ISOB2
A standard paper size. |
static int[] |
ISOB3
A standard paper size. |
static int[] |
ISOB4
A standard paper size. |
static int[] |
ISOB5
A standard paper size. |
static int[] |
ISOB5_EXTRA
A standard paper size. |
static int[] |
ISOB6
A standard paper size. |
static int[] |
ISOB7
A standard paper size. |
static int[] |
ISOB8
A standard paper size. |
static int[] |
ISOB9
A standard paper size. |
static int[] |
LEDGER
A standard paper size. |
static int[] |
LEGAL
A standard paper size. |
static int[] |
LEGAL_EXTRA
A standard paper size. |
static int[] |
LETTER
A standard paper size. |
static int[] |
LETTER_EXTRA
A standard paper size. |
static int[] |
LETTER_EXTRATRANSVERSE
A standard paper size. |
static int[] |
LETTER_PLUS
A standard paper size. |
static int[] |
LETTER_ROTATED
A standard paper size. |
static int[] |
LETTER_SMALL
A standard paper size. |
static int[] |
LETTER_TRANSVERSE
A standard paper size. |
static int[] |
MONARCH
A standard paper size. |
static int[] |
NOTE
A standard paper size. |
static int[] |
PAPER10X11
A standard paper size. |
static int[] |
PAPER10X13
A standard paper size. |
static int[] |
PAPER10X14
A standard paper size. |
static int[] |
PAPER11X17
A standard paper size. |
static int[] |
PAPER12X11
A standard paper size. |
static int[] |
PAPER15X11
A standard paper size. |
static int[] |
PAPER7X9
A standard paper size. |
static int[] |
PAPER8X10
A standard paper size. |
static int[] |
PAPER9X11
A standard paper size. |
static int[] |
PAPER9X12
A standard paper size. |
static int[] |
POSTCARD
A standard paper size. |
static int[] |
POSTCARD_ROTATED
A standard paper size. |
static int[] |
PRC16K
A standard paper size. |
static int[] |
PRC16K_ROTATED
A standard paper size. |
static int[] |
PRC32K
A standard paper size. |
static int[] |
PRC32K_BIG
A standard paper size. |
static int[] |
PRC32K_BIGROTATED
A standard paper size. |
static int[] |
PRC32K_ROTATED
A standard paper size. |
static int[] |
QUARTO
A standard paper size. |
static int[] |
STATEMENT
A standard paper size. |
static int[] |
SUPERA
A standard paper size. |
static int[] |
SUPERB
A standard paper size. |
static int[] |
TABLOID
A standard paper size. |
static int[] |
TABLOIDEXTRA
A standard paper size. |
Method Summary | |
double |
convertInchToPoints(double inches)
Converts the given inch value to a valid point-value. |
double |
convertMmToPoints(double mm)
Converts the given millimeter value to a valid point-value. |
java.awt.print.PageFormat |
createPageFormat(java.lang.Object[] data)
Restores a page format after it has been serialized. |
java.awt.print.PageFormat |
createPageFormat(java.awt.print.Paper paper,
int orientation)
Creates a new pageformat using the given paper and the given orientation. |
java.awt.print.Paper |
createPaper(int[] papersize)
Creates a paper by using the paper size in points found in the int-array. |
java.awt.print.Paper |
createPaper(int width,
int height)
Creates a paper by using the paper size in points. |
java.awt.print.Paper |
createPaper(java.lang.String name)
Creates a paper by looking up the given Uppercase name in this classes defined constants. |
double |
getBottomBorder(java.awt.print.Paper p)
Returns the bottom border of the given paper. |
static PageFormatFactory |
getInstance()
Returns a single instance of the factory. |
double |
getLeftBorder(java.awt.print.Paper p)
Returns the left border of the given paper. |
double |
getRightBorder(java.awt.print.Paper p)
Returns the right border of the given paper. |
double |
getTopBorder(java.awt.print.Paper p)
Returns the top border of the given paper. |
static boolean |
isEqual(java.awt.print.PageFormat pf1,
java.awt.print.PageFormat pf2)
Tests, whether the given two page format objects are equal. |
static void |
logPageFormat(java.awt.print.PageFormat pf)
Logs the page format. |
static void |
logPaper(java.awt.print.Paper pf)
Logs the paper size. |
java.lang.Object[] |
resolvePageFormat(java.awt.print.PageFormat format)
Resolves a page format, so that the result can be serialized. |
void |
setBorders(java.awt.print.Paper paper,
double top,
double left,
double bottom,
double right)
Defines the imageable area of the given paper by adjusting the border around the imagable area. |
void |
setBordersInch(java.awt.print.Paper paper,
double top,
double left,
double bottom,
double right)
Defines the imageable area of the given paper by adjusting the border around the imagable area. |
void |
setBordersMm(java.awt.print.Paper paper,
double top,
double left,
double bottom,
double right)
Defines the imageable area of the given paper by adjusting the border around the imagable area. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DOTS_PER_INCH
public static final int[] PAPER11X17
public static final int[] PAPER10X11
public static final int[] PAPER10X13
public static final int[] PAPER10X14
public static final int[] PAPER12X11
public static final int[] PAPER15X11
public static final int[] PAPER7X9
public static final int[] PAPER8X10
public static final int[] PAPER9X11
public static final int[] PAPER9X12
public static final int[] A0
public static final int[] A1
public static final int[] A2
public static final int[] A3
public static final int[] A3_TRANSVERSE
public static final int[] A3_EXTRA
public static final int[] A3_EXTRATRANSVERSE
public static final int[] A3_ROTATED
public static final int[] A4
public static final int[] A4_TRANSVERSE
public static final int[] A4_EXTRA
public static final int[] A4_PLUS
public static final int[] A4_ROTATED
public static final int[] A4_SMALL
public static final int[] A5
public static final int[] A5_TRANSVERSE
public static final int[] A5_EXTRA
public static final int[] A5_ROTATED
public static final int[] A6
public static final int[] A6_ROTATED
public static final int[] A7
public static final int[] A8
public static final int[] A9
public static final int[] A10
public static final int[] ANSIC
public static final int[] ANSID
public static final int[] ANSIE
public static final int[] ARCHA
public static final int[] ARCHB
public static final int[] ARCHC
public static final int[] ARCHD
public static final int[] ARCHE
public static final int[] B0
public static final int[] B1
public static final int[] B2
public static final int[] B3
public static final int[] B4
public static final int[] B4_ROTATED
public static final int[] B5
public static final int[] B5_TRANSVERSE
public static final int[] B5_ROTATED
public static final int[] B6
public static final int[] B6_ROTATED
public static final int[] B7
public static final int[] B8
public static final int[] B9
public static final int[] B10
public static final int[] C4
public static final int[] C5
public static final int[] C6
public static final int[] COMM10
public static final int[] DL
public static final int[] DOUBLEPOSTCARD
public static final int[] DOUBLEPOSTCARD_ROTATED
public static final int[] ENV9
public static final int[] ENV10
public static final int[] ENV11
public static final int[] ENV12
public static final int[] ENV14
public static final int[] ENVC0
public static final int[] ENVC1
public static final int[] ENVC2
public static final int[] ENVC3
public static final int[] ENVC4
public static final int[] ENVC5
public static final int[] ENVC6
public static final int[] ENVC65
public static final int[] ENVC7
public static final int[] ENVCHOU3
public static final int[] ENVCHOU3_ROTATED
public static final int[] ENVCHOU4
public static final int[] ENVCHOU4_ROTATED
public static final int[] ENVDL
public static final int[] ENVINVITE
public static final int[] ENVISOB4
public static final int[] ENVISOB5
public static final int[] ENVISOB6
public static final int[] ENVITALIAN
public static final int[] ENVELOPE
public static final int[] ENVKAKU2
public static final int[] ENVKAKU2_ROTATED
public static final int[] ENVKAKU3
public static final int[] ENVKAKU3_ROTATED
public static final int[] ENVMONARCH
public static final int[] ENVPERSONAL
public static final int[] ENVPRC1
public static final int[] ENVPRC1_ROTATED
public static final int[] ENVPRC2
public static final int[] ENVPRC2_ROTATED
public static final int[] ENVPRC3
public static final int[] ENVPRC3_ROTATED
public static final int[] ENVPRC4
public static final int[] ENVPRC4_ROTATED
public static final int[] ENVPRC5
public static final int[] ENVPRC5_ROTATED
public static final int[] ENVPRC6
public static final int[] ENVPRC6_ROTATED
public static final int[] ENVPRC7
public static final int[] ENVPRC7_ROTATED
public static final int[] ENVPRC8
public static final int[] ENVPRC8_ROTATED
public static final int[] ENVPRC9
public static final int[] ENVPRC9_ROTATED
public static final int[] ENVPRC10
public static final int[] ENVPRC10_ROTATED
public static final int[] ENVYOU4
public static final int[] ENVYOU4_ROTATED
public static final int[] EXECUTIVE
public static final int[] FANFOLDUS
public static final int[] FANFOLDGERMAN
public static final int[] FANFOLDGERMANLEGAL
public static final int[] FOLIO
public static final int[] ISOB0
public static final int[] ISOB1
public static final int[] ISOB2
public static final int[] ISOB3
public static final int[] ISOB4
public static final int[] ISOB5
public static final int[] ISOB5_EXTRA
public static final int[] ISOB6
public static final int[] ISOB7
public static final int[] ISOB8
public static final int[] ISOB9
public static final int[] ISOB10
public static final int[] LEDGER
public static final int[] LEGAL
public static final int[] LEGAL_EXTRA
public static final int[] LETTER
public static final int[] LETTER_TRANSVERSE
public static final int[] LETTER_EXTRA
public static final int[] LETTER_EXTRATRANSVERSE
public static final int[] LETTER_PLUS
public static final int[] LETTER_ROTATED
public static final int[] LETTER_SMALL
public static final int[] MONARCH
public static final int[] NOTE
public static final int[] POSTCARD
public static final int[] POSTCARD_ROTATED
public static final int[] PRC16K
public static final int[] PRC16K_ROTATED
public static final int[] PRC32K
public static final int[] PRC32K_ROTATED
public static final int[] PRC32K_BIG
public static final int[] PRC32K_BIGROTATED
public static final int[] QUARTO
public static final int[] STATEMENT
public static final int[] SUPERA
public static final int[] SUPERB
public static final int[] TABLOID
public static final int[] TABLOIDEXTRA
Method Detail |
public static PageFormatFactory getInstance()
public java.awt.print.Paper createPaper(int[] papersize)
papersize
- the definition of the papersize in a 2-element int-array
public java.awt.print.Paper createPaper(int width, int height)
width
- the width of the paper in pointsheight
- the height of the paper in points
public void setBorders(java.awt.print.Paper paper, double top, double left, double bottom, double right)
paper
- the paper that should be modifiedtop
- the bordersize of the top-borderleft
- the border in points in the leftbottom
- the border in points in the bottomright
- the border in points in the rightpublic void setBordersInch(java.awt.print.Paper paper, double top, double left, double bottom, double right)
paper
- the paper that should be modifiedtop
- the bordersize of the top-borderleft
- the border in points in the leftbottom
- the border in points in the bottomright
- the border in points in the rightpublic void setBordersMm(java.awt.print.Paper paper, double top, double left, double bottom, double right)
paper
- the paper that should be modifiedtop
- the bordersize of the top-borderleft
- the border in points in the leftbottom
- the border in points in the bottomright
- the border in points in the rightpublic double convertInchToPoints(double inches)
inches
- the size in inch
public double convertMmToPoints(double mm)
mm
- the size in inch
public java.awt.print.PageFormat createPageFormat(java.awt.print.Paper paper, int orientation)
paper
- the paper to use in the new pageformatorientation
- one of PageFormat.PORTRAIT, PageFormat.LANDSCAPE or
PageFormat.REVERSE_LANDSCAPE
java.lang.NullPointerException
- if the paper given was nullpublic java.awt.print.Paper createPaper(java.lang.String name)
name
- the name of the constant defining the papersize
public static void logPageFormat(java.awt.print.PageFormat pf)
pf
- the page format.public static void logPaper(java.awt.print.Paper pf)
pf
- the paper size.public static boolean isEqual(java.awt.print.PageFormat pf1, java.awt.print.PageFormat pf2)
pf1
- the first page format that should be compared.pf2
- the second page format that should be compared.
public double getLeftBorder(java.awt.print.Paper p)
p
- the paper that defines the borders.
public double getRightBorder(java.awt.print.Paper p)
p
- the paper that defines the borders.
public double getTopBorder(java.awt.print.Paper p)
p
- the paper that defines the borders.
public double getBottomBorder(java.awt.print.Paper p)
p
- the paper that defines the borders.
public java.lang.Object[] resolvePageFormat(java.awt.print.PageFormat format)
format
- the page format that should be prepared for serialisation.
public java.awt.print.PageFormat createPageFormat(java.lang.Object[] data)
data
- the serialized page format data.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |