public class DefaultPrintPreferences extends java.lang.Object implements IPrintPreferences
Modifier and Type | Field and Description |
---|---|
static int |
CENTER |
static int |
CURRENT_SCALE |
static double |
CURRENT_SCALE_DEFAULT |
static double[] |
DEFAULT_DOUBLE_PREFERENCES |
static int[] |
DEFAULT_INT_PREFERENCES |
static int |
HEIGHT |
static double |
HEIGHT_DEFAULT |
static int |
LEFT_MARGIN |
static double |
LEFT_MARGIN_DEFAULT |
static int |
NUM_OF_DOUBLE_PREFERENCES |
static int |
NUM_OF_INT_PREFERENCES |
static int |
PRINTER_IMAGE_HEIGHT |
static double |
PRINTER_IMAGE_HEIGHT_DEFAULT |
static int |
PRINTER_IMAGE_WIDTH |
static double |
PRINTER_IMAGE_WIDTH_DEFAULT |
static int |
PRINTER_LEFT_MARGIN |
static double |
PRINTER_LEFT_MARGIN_DEFAULT |
static int |
PRINTER_TOP_MARGIN |
static double |
PRINTER_TOP_MARGIN_DEFAULT |
static int |
SCALE_FACTOR |
static double |
SCALE_FACTOR_DEFAULT |
static int |
SCALE_FACTOR_X |
static int |
SCALE_FACTOR_Y |
static int |
TOP_MARGIN |
static double |
TOP_MARGIN_DEFAULT |
static int |
WIDTH |
static double |
WIDTH_DEFAULT |
Constructor and Description |
---|
DefaultPrintPreferences()
Creates a new instance of DefaultPrintPreferences, which is initialized
with the default values.
|
Modifier and Type | Method and Description |
---|---|
double |
getDoublePreference(int preference)
Returns the double value of the preference with the given index.
|
int |
getIntPreference(int preference)
Returns the integer value of the preference with the given index.
|
void |
setDefaults()
Resets all preferences to their default values.
|
void |
setDoublePreference(int preference,
double value)
Sets the double preference value of the preference at position atIndex to
the given value.
|
void |
setIntPreference(int preference,
int value)
Sets the integer preference value of the preference at position atIndex
to the given value.
|
public static final int SCALE_FACTOR_X
public static final int SCALE_FACTOR_Y
public static final int LEFT_MARGIN
public static final int TOP_MARGIN
public static final int SCALE_FACTOR
public static final int CURRENT_SCALE
public static final int PRINTER_IMAGE_WIDTH
public static final int PRINTER_IMAGE_HEIGHT
public static final int PRINTER_LEFT_MARGIN
public static final int PRINTER_TOP_MARGIN
public static final int WIDTH
public static final int HEIGHT
public static final int CENTER
public static final double SCALE_FACTOR_DEFAULT
public static final double LEFT_MARGIN_DEFAULT
public static final double TOP_MARGIN_DEFAULT
public static final double CURRENT_SCALE_DEFAULT
public static final double PRINTER_IMAGE_WIDTH_DEFAULT
public static final double PRINTER_IMAGE_HEIGHT_DEFAULT
public static final double PRINTER_LEFT_MARGIN_DEFAULT
public static final double PRINTER_TOP_MARGIN_DEFAULT
public static final double WIDTH_DEFAULT
public static final double HEIGHT_DEFAULT
public static final double[] DEFAULT_DOUBLE_PREFERENCES
public static final int[] DEFAULT_INT_PREFERENCES
public static final int NUM_OF_DOUBLE_PREFERENCES
public static final int NUM_OF_INT_PREFERENCES
public DefaultPrintPreferences()
public void setDefaults()
IPrintPreferences
setDefaults
in interface IPrintPreferences
public void setIntPreference(int preference, int value)
IPrintPreferences
setIntPreference
in interface IPrintPreferences
preference
- The index of the preference to setvalue
- The new value to setpublic int getIntPreference(int preference)
IPrintPreferences
getIntPreference
in interface IPrintPreferences
preference
- The index of the preference to returnpublic void setDoublePreference(int preference, double value)
IPrintPreferences
setDoublePreference
in interface IPrintPreferences
preference
- The index of the preference to setvalue
- The new value to setpublic double getDoublePreference(int preference)
IPrintPreferences
getDoublePreference
in interface IPrintPreferences
preference
- The index of the preference to return