Package kiyut.sketsa.options
Class CanvasOptions
- java.lang.Object
-
- kiyut.sketsa.options.AbstractOptions
-
- kiyut.sketsa.options.CanvasOptions
-
- All Implemented Interfaces:
Options
public class CanvasOptions extends AbstractOptions
Implementation of Canvas Preferences- Author:
- Kiyut
-
-
Field Summary
Fields Modifier and Type Field Description static StringCANVAS_ANTI_ALIAS_PROPERTYstatic StringGRID_COLOR_PROPERTYstatic StringGRID_SIZE_PROPERTYstatic intGRID_STYLE_DOTstatic intGRID_STYLE_LINEstatic StringGRID_STYLE_PROPERTYstatic StringHANDLE_SIZE_PROPERTYstatic StringSELECTION_COLOR_PROPERTY-
Fields inherited from class kiyut.sketsa.options.AbstractOptions
DEFAULT_NODE_NAME, nodeName
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCanvasOptions()Creates a new instance of Preferences
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StrokecreateGridStroke(int gridStyle)ColorgetGridColor()intgetGridSize()StrokegetGridStroke()intgetGridStyle()intgetHandleSize()static CanvasOptionsgetInstance()Returns the single instance, creating one if it's the first time this method is called.ColorgetSelectionColor()booleanisCanvasAntiAliased()voidsetCanvasAntiAliased(boolean antiAlias)voidsetGridColor(Color color)voidsetGridSize(int size)voidsetGridStyle(int gridStyle)voidsetHandleSize(int size)voidsetSelectionColor(Color selectionColor)-
Methods inherited from class kiyut.sketsa.options.AbstractOptions
addPropertyChangeListener, firePropertyChange, getPreferences, removePropertyChangeListener
-
-
-
-
Field Detail
-
SELECTION_COLOR_PROPERTY
public static final String SELECTION_COLOR_PROPERTY
- See Also:
- Constant Field Values
-
CANVAS_ANTI_ALIAS_PROPERTY
public static final String CANVAS_ANTI_ALIAS_PROPERTY
- See Also:
- Constant Field Values
-
GRID_COLOR_PROPERTY
public static final String GRID_COLOR_PROPERTY
- See Also:
- Constant Field Values
-
GRID_SIZE_PROPERTY
public static final String GRID_SIZE_PROPERTY
- See Also:
- Constant Field Values
-
GRID_STYLE_PROPERTY
public static final String GRID_STYLE_PROPERTY
- See Also:
- Constant Field Values
-
GRID_STYLE_LINE
public static final int GRID_STYLE_LINE
- See Also:
- Constant Field Values
-
GRID_STYLE_DOT
public static final int GRID_STYLE_DOT
- See Also:
- Constant Field Values
-
HANDLE_SIZE_PROPERTY
public static final String HANDLE_SIZE_PROPERTY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static CanvasOptions getInstance()
Returns the single instance, creating one if it's the first time this method is called.- Returns:
- The single instance.
-
setSelectionColor
public void setSelectionColor(Color selectionColor)
-
getSelectionColor
public Color getSelectionColor()
-
setCanvasAntiAliased
public void setCanvasAntiAliased(boolean antiAlias)
-
isCanvasAntiAliased
public boolean isCanvasAntiAliased()
-
setGridColor
public void setGridColor(Color color)
-
getGridColor
public Color getGridColor()
-
setGridSize
public void setGridSize(int size)
-
getGridSize
public int getGridSize()
-
getGridStroke
public Stroke getGridStroke()
-
setGridStyle
public void setGridStyle(int gridStyle)
-
getGridStyle
public int getGridStyle()
-
createGridStroke
protected Stroke createGridStroke(int gridStyle)
-
setHandleSize
public void setHandleSize(int size)
-
getHandleSize
public int getHandleSize()
-
-