|
org.openide.text 6.16 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openide.text.PrintPreferences
public final class PrintPreferences
Allows get, set properties that specify the look of a printed Source Editor page, including headers, footers, vertical spacing, and line numbers.
Nested Class Summary | |
---|---|
static class |
PrintPreferences.Alignment
Constants for center, right, left position of page header, footer. |
Method Summary | |
---|---|
static PrintPreferences.Alignment |
getFooterAlignment()
|
static Font |
getFooterFont()
|
static String |
getFooterFormat()
See setFooterFormat(java.lang.String) |
static PrintPreferences.Alignment |
getHeaderAlignment()
|
static Font |
getHeaderFont()
|
static String |
getHeaderFormat()
See setHeaderFormat(java.lang.String) |
static float |
getLineAscentCorrection()
|
static PageFormat |
getPageFormat(PrinterJob pj)
Get an instance of PageFormat . |
static boolean |
getWrap()
Wrap lines. |
static void |
setFooterAlignment(PrintPreferences.Alignment alignment)
|
static void |
setFooterFont(Font f)
|
static void |
setFooterFormat(String s)
Set the text for the page footer. |
static void |
setHeaderAlignment(PrintPreferences.Alignment alignment)
|
static void |
setHeaderFont(Font f)
|
static void |
setHeaderFormat(String s)
Set the text for the page header. |
static void |
setLineAscentCorrection(float correction)
|
static void |
setPageFormat(PageFormat pf)
|
static void |
setWrap(boolean wrap)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static PageFormat getPageFormat(PrinterJob pj)
PageFormat
.
pj
- PrinterJob
which is
associated with the default printer.
PageFormat
that describes the size and
orientation of a page to be printed.public static void setPageFormat(PageFormat pf)
pf
- PageFormat
that describes the size and
orientation of a page to be printedpublic static boolean getWrap()
public static void setWrap(boolean wrap)
wrap
- See getWrap()
public static String getHeaderFormat()
setHeaderFormat(java.lang.String)
public static void setHeaderFormat(String s)
s
- the text for the page headerpublic static String getFooterFormat()
setFooterFormat(java.lang.String)
public static void setFooterFormat(String s)
s
- the text for the page footerpublic static Font getHeaderFont()
public static void setHeaderFont(Font f)
f
- the font for the headerpublic static Font getFooterFont()
public static void setFooterFont(Font f)
f
- the font for the footerpublic static PrintPreferences.Alignment getHeaderAlignment()
public static void setHeaderAlignment(PrintPreferences.Alignment alignment)
alignment
- whether the header should be centered, left aligned, or right aligned.public static PrintPreferences.Alignment getFooterAlignment()
public static void setFooterAlignment(PrintPreferences.Alignment alignment)
alignment
- whether the footer should be centered, left aligned, or right aligned.public static float getLineAscentCorrection()
public static void setLineAscentCorrection(float correction)
correction
- the amount of vertical space to print between lines.
IllegalArgumentException
- if correction is less than 0.
|
org.openide.text 6.16 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |