Package org.eclipse.graphiti.ui.internal.util.ui.print

# Class DefaultPrintPreferences

java.lang.Object
org.eclipse.graphiti.ui.internal.util.ui.print.DefaultPrintPreferences

All Implemented Interfaces:
  `IPrintPreferences`

public class DefaultPrintPreferences extends Object implements IPrintPreferences
This class is a simple container for the preferences for the print dialog.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`CENTER`
`static final int`
`CURRENT_SCALE`
`static final double`
`CURRENT_SCALE_DEFAULT`
`static final double[]`
`DEFAULT_DOUBLE_PREFERENCES`
`static final int[]`
`DEFAULT_INT_PREFERENCES`
`static final int`
`HEIGHT`
`static final double`
`HEIGHT_DEFAULT`
`static final int`
`LEFT_MARGIN`
`static final double`
`LEFT_MARGIN_DEFAULT`
`static final int`
`NUM_OF_DOUBLE_PREFERENCES`
`static final int`
`NUM_OF_INT_PREFERENCES`
`static final int`
`PRINTER_IMAGE_HEIGHT`
`static final double`
`PRINTER_IMAGE_HEIGHT_DEFAULT`
`static final int`
`PRINTER_IMAGE_WIDTH`
`static final double`
`PRINTER_IMAGE_WIDTH_DEFAULT`
`static final int`
`PRINTER_LEFT_MARGIN`
`static final double`
`PRINTER_LEFT_MARGIN_DEFAULT`
`static final int`
`PRINTER_TOP_MARGIN`
`static final double`
`PRINTER_TOP_MARGIN_DEFAULT`
`static final int`
`SCALE_FACTOR`
`static final double`
`SCALE_FACTOR_DEFAULT`
`static final int`
`SCALE_FACTOR_X`
`static final int`
`SCALE_FACTOR_Y`
`static final int`
`TOP_MARGIN`
`static final double`
`TOP_MARGIN_DEFAULT`
`static final int`
`WIDTH`
`static final double`
`WIDTH_DEFAULT`

## Constructor Summary

Constructors
Constructor
Description
`DefaultPrintPreferences()`
Creates a new instance of DefaultPrintPreferences, which is initialized with the default values.

## Method Summary

Modifier and Type
Method
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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### SCALE_FACTOR_X

public static final int SCALE_FACTOR_X

See Also:
  - Constant Field Values

### SCALE_FACTOR_Y

public static final int SCALE_FACTOR_Y

See Also:
  - Constant Field Values

### LEFT_MARGIN

public static final int LEFT_MARGIN

See Also:
  - Constant Field Values

### TOP_MARGIN

public static final int TOP_MARGIN

See Also:
  - Constant Field Values

### SCALE_FACTOR

public static final int SCALE_FACTOR

See Also:
  - Constant Field Values

### CURRENT_SCALE

public static final int CURRENT_SCALE

See Also:
  - Constant Field Values

### PRINTER_IMAGE_WIDTH

public static final int PRINTER_IMAGE_WIDTH

See Also:
  - Constant Field Values

### PRINTER_IMAGE_HEIGHT

public static final int PRINTER_IMAGE_HEIGHT

See Also:
  - Constant Field Values

### PRINTER_LEFT_MARGIN

public static final int PRINTER_LEFT_MARGIN

See Also:
  - Constant Field Values

### PRINTER_TOP_MARGIN

public static final int PRINTER_TOP_MARGIN

See Also:
  - Constant Field Values

### WIDTH

public static final int WIDTH

See Also:
  - Constant Field Values

### HEIGHT

public static final int HEIGHT

See Also:
  - Constant Field Values

### CENTER

public static final int CENTER

See Also:
  - Constant Field Values

### SCALE_FACTOR_DEFAULT

public static final double SCALE_FACTOR_DEFAULT

See Also:
  - Constant Field Values

### LEFT_MARGIN_DEFAULT

public static final double LEFT_MARGIN_DEFAULT

See Also:
  - Constant Field Values

### TOP_MARGIN_DEFAULT

public static final double TOP_MARGIN_DEFAULT

See Also:
  - Constant Field Values

### CURRENT_SCALE_DEFAULT

public static final double CURRENT_SCALE_DEFAULT

See Also:
  - Constant Field Values

### PRINTER_IMAGE_WIDTH_DEFAULT

public static final double PRINTER_IMAGE_WIDTH_DEFAULT

See Also:
  - Constant Field Values

### PRINTER_IMAGE_HEIGHT_DEFAULT

public static final double PRINTER_IMAGE_HEIGHT_DEFAULT

See Also:
  - Constant Field Values

### PRINTER_LEFT_MARGIN_DEFAULT

public static final double PRINTER_LEFT_MARGIN_DEFAULT

See Also:
  - Constant Field Values

### PRINTER_TOP_MARGIN_DEFAULT

public static final double PRINTER_TOP_MARGIN_DEFAULT

See Also:
  - Constant Field Values

### WIDTH_DEFAULT

public static final double WIDTH_DEFAULT

See Also:
  - Constant Field Values

### HEIGHT_DEFAULT

public static final double HEIGHT_DEFAULT

See Also:
  - Constant Field Values

### DEFAULT_DOUBLE_PREFERENCES

public static final double[] DEFAULT_DOUBLE_PREFERENCES

### DEFAULT_INT_PREFERENCES

public static final int[] DEFAULT_INT_PREFERENCES

### NUM_OF_DOUBLE_PREFERENCES

public static final int NUM_OF_DOUBLE_PREFERENCES

### NUM_OF_INT_PREFERENCES

public static final int NUM_OF_INT_PREFERENCES

## Constructor Details

### DefaultPrintPreferences

public DefaultPrintPreferences()
Creates a new instance of DefaultPrintPreferences, which is initialized with the default values.

## Method Details

### setDefaults

public void setDefaults()
Description copied from interface: `IPrintPreferences`
Resets all preferences to their default values.

Specified by:
  `setDefaults` in interface `IPrintPreferences`

### setIntPreference

public void setIntPreference(int preference, int value)
Description copied from interface: `IPrintPreferences`
Sets the integer preference value of the preference at position atIndex to the given value.

Specified by:
  `setIntPreference` in interface `IPrintPreferences`
Parameters:
  `preference` - The index of the preference to set
  `value` - The new value to set

### getIntPreference

public int getIntPreference(int preference)
Description copied from interface: `IPrintPreferences`
Returns the integer value of the preference with the given index.

Specified by:
  `getIntPreference` in interface `IPrintPreferences`
Parameters:
  `preference` - The index of the preference to return
Returns:
  The value of the preference with the given index as an integer

### setDoublePreference

public void setDoublePreference(int preference, double value)
Description copied from interface: `IPrintPreferences`
Sets the double preference value of the preference at position atIndex to the given value.

Specified by:
  `setDoublePreference` in interface `IPrintPreferences`
Parameters:
  `preference` - The index of the preference to set
  `value` - The new value to set

### getDoublePreference

public double getDoublePreference(int preference)
Description copied from interface: `IPrintPreferences`
Returns the double value of the preference with the given index.

Specified by:
  `getDoublePreference` in interface `IPrintPreferences`
Parameters:
  `preference` - The index of the preference to return
Returns:
  The value of the preference with the given index as a double