public final class PrintSettings extends ContextSystemOption
Modifier and Type | Class and Description |
---|---|
static class |
PrintSettings.AlignmentEditor
Property editor for alignment properties
|
static class |
PrintSettings.PageFormatEditor
Property editor for PageFormat instances
|
Modifier and Type | Field and Description |
---|---|
static int |
CENTER
Constant for center position of page header.
|
static int |
LEFT
Constant for left position of page header.
|
static String |
PROP_FOOTER_ALIGNMENT
Property name of the footer alignment property
|
static String |
PROP_FOOTER_FONT
Property name of the footer font property
|
static String |
PROP_FOOTER_FORMAT
Property name of the footer format property
|
static String |
PROP_HEADER_ALIGNMENT
Property name of the header alignment property
|
static String |
PROP_HEADER_FONT
Property name of the header font property
|
static String |
PROP_HEADER_FORMAT
Property name of the header format property
|
static String |
PROP_LINE_ASCENT_CORRECTION
Property name of the line ascent correction property
|
static String |
PROP_PAGE_FORMAT
Property name of the wrap property
|
static String |
PROP_WRAP
Property name of the wrap property
|
static int |
RIGHT
Constant for right position of page header.
|
beanContext
Constructor and Description |
---|
PrintSettings() |
Modifier and Type | Method and Description |
---|---|
String |
displayName()
Get the display name of this system option.
|
int |
getFooterAlignment() |
Font |
getFooterFont() |
String |
getFooterFormat() |
int |
getHeaderAlignment() |
Font |
getHeaderFont() |
String |
getHeaderFormat() |
HelpCtx |
getHelpCtx()
Get context help for this system option.
|
float |
getLineAscentCorrection()
Getter for lineAscentCorrection property.
|
PageFormat |
getPageFormat()
Deprecated.
Use
PrintSettings.getPageFormat(PrinterJob) instead. |
static PageFormat |
getPageFormat(PrinterJob pj) |
boolean |
getWrap() |
void |
readExternal(ObjectInput obtis)
Read all properties of this object (or subclasses) from an object input.
|
void |
setFooterAlignment(int alignment) |
void |
setFooterFont(Font f) |
void |
setFooterFormat(String s) |
void |
setHeaderAlignment(int alignment) |
void |
setHeaderFont(Font f) |
void |
setHeaderFormat(String s) |
void |
setLineAscentCorrection(float correction)
Setter for lineAscentCorrection property.
|
void |
setPageFormat(PageFormat pf)
sets page format
|
void |
setWrap(boolean b) |
void |
writeExternal(ObjectOutput obtos)
Write all properties of this object (or subclasses) to an object output.
|
addOption, getBeanContextProxy, getOptions, initialize, removeOption
clearSharedData, firePropertyChange, getName, isReadExternal, isWriteExternal, reset
addNotify, addPropertyChangeListener, equals, finalize, findObject, findObject, getLock, getProperty, hashCode, putProperty, putProperty, removeNotify, removePropertyChangeListener, writeReplace
public static final int CENTER
public static final int RIGHT
public static final int LEFT
public static final String PROP_PAGE_FORMAT
public static final String PROP_WRAP
public static final String PROP_HEADER_FORMAT
public static final String PROP_FOOTER_FORMAT
public static final String PROP_HEADER_FONT
public static final String PROP_FOOTER_FONT
public static final String PROP_HEADER_ALIGNMENT
public static final String PROP_FOOTER_ALIGNMENT
public static final String PROP_LINE_ASCENT_CORRECTION
public String displayName()
SystemOption
displayName
in class SystemOption
public HelpCtx getHelpCtx()
SystemOption
getHelpCtx
in interface HelpCtx.Provider
getHelpCtx
in class SystemOption
public static PageFormat getPageFormat(PrinterJob pj)
@Deprecated public PageFormat getPageFormat()
PrintSettings.getPageFormat(PrinterJob)
instead.public void setPageFormat(PageFormat pf)
public boolean getWrap()
public void setWrap(boolean b)
public String getHeaderFormat()
public void setHeaderFormat(String s)
public String getFooterFormat()
public void setFooterFormat(String s)
public Font getHeaderFont()
public void setHeaderFont(Font f)
public Font getFooterFont()
public void setFooterFont(Font f)
public int getHeaderAlignment()
public void setHeaderAlignment(int alignment)
public int getFooterAlignment()
public void setFooterAlignment(int alignment)
public float getLineAscentCorrection()
public void setLineAscentCorrection(float correction)
correction
- the correctionIllegalArgumentException
- if correction is less than 0.public void writeExternal(ObjectOutput obtos) throws IOException
SystemOption
writeExternal
in interface Externalizable
writeExternal
in class ContextSystemOption
obtos
- the output streamIOException
- on errorpublic void readExternal(ObjectInput obtis) throws IOException, ClassNotFoundException
SystemOption
readExternal
in interface Externalizable
readExternal
in class ContextSystemOption
obtis
- the input streamIOException
- on errorClassNotFoundException
- if a class used to restore the system option is not found