public class PrinterControl extends DataObject implements Encodable
Modifier and Type | Field and Description |
---|---|
static int |
COLOR_MONO
The same as COLOR_MONO_BEST, allows the use of the color ink for better grayscale.
|
static int |
COLOR_MONO_BEST
The same as COLOR_MONO, allows the use of the color ink for better grayscale.
|
static int |
COLOR_MONO_BLACK_INK_ONLY
A colorMode value.
|
static int |
COLOR_PHOTO_COLOR
Use the best color available on the printer.
|
static int |
COLOR_STANDARD_COLOR
Use the regular color available on the printer.
|
int |
colorMode |
static int |
COLORMODE_IS_SET |
static String[] |
colorNames |
static int[] |
colorValues |
static int |
DUPLEX_HORIZONTAL |
static int |
DUPLEX_LONG_EDGE
The same as DUPLEX_VERTICAL
|
static int |
DUPLEX_NO_DUPLEX |
static int |
DUPLEX_SHORT_EDGE
The same as DUPLEX_HORIZONTAL
|
static int |
DUPLEX_SIMPLEX
The same as DUPLEX_NO_DUPLEX.
|
static int |
DUPLEX_VERTICAL |
int |
duplexMode |
static int |
DUPLEXMODE_IS_SET |
static String[] |
duplexNames |
static int[] |
duplexValues |
static int |
PAPER_A4 |
static int |
PAPER_LEGAL |
static int |
PAPER_LETTER |
static String[] |
paperNames |
int |
paperSize |
static int |
PAPERSIZE_IS_SET |
static int[] |
paperValues |
int |
printQuality |
static int |
PRINTQUALITY_IS_SET |
static int |
QUALITY_BEST |
static int |
QUALITY_DRAFT |
static int |
QUALITY_HIGH |
static int |
QUALITY_LOW |
static int |
QUALITY_MEDIUM |
static String[] |
qualityNames |
static int[] |
qualityValues |
int |
valuesFlags
This contains a single bit for each value represented in this
Object. if the XXX_IS_SET bit is present, it means that field in
the Object has been set and holds valid data.
|
Constructor and Description |
---|
PrinterControl()
Create a PrinterControl with all values not set.
|
PrinterControl(boolean dontChooseDefaultValues)
Create a PrinterControl optionally leaving all values unset.
|
Modifier and Type | Method and Description |
---|---|
PrinterProperties |
addToProperties(PrinterProperties properties)
Add the PrinterControl() to a PrinterProperties.
|
static String |
getColorMode(int value) |
static String |
getDuplexMode(int value) |
static PrinterControl |
getOrCreatePrinterControl(PrinterProperties properties)
If there is a PrinterControl set for the PrinterProperties, then
return it, otherwise create, add and return a new one.
|
static String |
getPaperSize(int value) |
static String |
getPrinterQuality(int value) |
void |
overrideInProperties(PrinterProperties properties)
Override the PrinterControl value in properties with the
values set in this PrinterControl.
|
PrinterControl |
overrideWith(PrinterControl other)
Override values in thes PrinterControl with the other PrinterControl.
|
PrinterControl |
setColorMode(int color)
Sets the color mode and returns itself.
|
PrinterControl |
setDuplexMode(int duplexType)
Sets the duplex mode and returns itself.
|
PrinterControl |
setPaperSize(int paper)
Sets the paper size and returns itself.
|
PrinterControl |
setPrintQuality(int qualityType)
Sets the print quality and returns itself.
|
_getFieldType, _getSetField, cache, compareTo, copied, copyFrom, equals, getCopy, getDeclaredField, getDeclaredFieldValue, getMyFieldList, getNew
public static int[] qualityValues
public static String[] qualityNames
public static int[] paperValues
public static String[] paperNames
public static int[] duplexValues
public static String[] duplexNames
public static int[] colorValues
public static String[] colorNames
public int valuesFlags
public static final int DUPLEXMODE_IS_SET
public static final int PRINTQUALITY_IS_SET
public static final int COLORMODE_IS_SET
public static final int PAPERSIZE_IS_SET
public static final int DUPLEX_NO_DUPLEX
public static final int DUPLEX_SIMPLEX
public static final int DUPLEX_HORIZONTAL
public static final int DUPLEX_VERTICAL
public static final int DUPLEX_LONG_EDGE
public static final int DUPLEX_SHORT_EDGE
public int duplexMode
public static final int QUALITY_DRAFT
public static final int QUALITY_LOW
public static final int QUALITY_MEDIUM
public static final int QUALITY_HIGH
public static final int QUALITY_BEST
public int printQuality
public static final int COLOR_MONO_BLACK_INK_ONLY
public static final int COLOR_MONO
public static final int COLOR_MONO_BEST
public static final int COLOR_STANDARD_COLOR
public static final int COLOR_PHOTO_COLOR
public int colorMode
public static final int PAPER_LETTER
public static final int PAPER_LEGAL
public static final int PAPER_A4
public int paperSize
public PrinterControl(boolean dontChooseDefaultValues)
dontChooseDefaultValues
- if this is true then the valuesFlags
will be set to zero, indicating that no values have been set.public PrinterControl()
public static String getPrinterQuality(int value)
public static String getColorMode(int value)
public static String getDuplexMode(int value)
public static String getPaperSize(int value)
public PrinterControl setDuplexMode(int duplexType)
public PrinterControl setPrintQuality(int qualityType)
public PrinterControl setColorMode(int color)
public PrinterControl setPaperSize(int paper)
public PrinterProperties addToProperties(PrinterProperties properties)
properties
- the PrinterProperties to add this PrinterControl
to. If it is null a new one is created and returned.public static PrinterControl getOrCreatePrinterControl(PrinterProperties properties)
properties
- a non-null PrinterProperties object.public void overrideInProperties(PrinterProperties properties)
properties
- a non-null PrinterProperties.public PrinterControl overrideWith(PrinterControl other)
other
- the other PrinterControl whose set values will
override those in this PrinterControl.