Package g3.project.graphics
Class StrokeProps
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<java.lang.String,java.lang.Object>
-
- g3.project.graphics.StrokeProps
-
- All Implemented Interfaces:
Props
,java.io.Serializable
,java.lang.Cloneable
,java.util.Map<java.lang.String,java.lang.Object>
public final class StrokeProps extends java.util.HashMap<java.lang.String,java.lang.Object> implements Props
- Author:
- Group 3
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COLOUR
static java.lang.Class
COLOUR_TYPE
static java.lang.String
DASH_STYLE
static java.lang.String
DOT_DASH_STYLE
static java.lang.String
DOT_STYLE
static java.lang.String
LINE_CAP
static java.lang.Class
LINE_CAP_TYPE
static java.lang.String
LINE_STYLE
static java.lang.Class
LINE_STYLE_TYPE
protected static java.util.Map<java.lang.String,java.lang.Object>
PROP_DEFAULTS
Contains default values for known props.protected static java.util.Map<java.lang.String,java.lang.Class>
PROPS_MAP
Contains known props and their classes.protected static java.util.Map<java.lang.String,java.lang.String>
PROPS_NAMES
Property friendly names.static java.lang.String
SOLID_STYLE
static java.lang.String
WIDTH
static java.lang.Class
WIDTH_TYPE
-
Constructor Summary
Constructors Constructor Description StrokeProps()
Empty constructor.StrokeProps(java.util.Map<java.lang.String,java.lang.Object> propertiesMap)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
getDefaultProps()
Get default properties.java.util.Optional<java.lang.Object>
getProp(java.lang.String prop)
Return value of specified property.java.util.Map<java.lang.String,java.lang.Object>
getProps()
Get all current props.java.util.Map<java.lang.String,java.lang.String>
getPropsNames()
Get property friendly names.java.util.Map<java.lang.String,java.lang.Class>
getPropsTypes()
Get property types.java.lang.String
toCSS()
Get the JFX CSS for these properties.-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Field Detail
-
WIDTH
public static final java.lang.String WIDTH
- See Also:
- Constant Field Values
-
WIDTH_TYPE
public static final java.lang.Class WIDTH_TYPE
-
LINE_STYLE
public static final java.lang.String LINE_STYLE
- See Also:
- Constant Field Values
-
LINE_STYLE_TYPE
public static final java.lang.Class LINE_STYLE_TYPE
-
COLOUR
public static final java.lang.String COLOUR
- See Also:
- Constant Field Values
-
COLOUR_TYPE
public static final java.lang.Class COLOUR_TYPE
-
LINE_CAP
public static final java.lang.String LINE_CAP
- See Also:
- Constant Field Values
-
LINE_CAP_TYPE
public static final java.lang.Class LINE_CAP_TYPE
-
DOT_DASH_STYLE
public static final java.lang.String DOT_DASH_STYLE
- See Also:
- Constant Field Values
-
DASH_STYLE
public static final java.lang.String DASH_STYLE
- See Also:
- Constant Field Values
-
DOT_STYLE
public static final java.lang.String DOT_STYLE
- See Also:
- Constant Field Values
-
SOLID_STYLE
public static final java.lang.String SOLID_STYLE
- See Also:
- Constant Field Values
-
PROPS_MAP
protected static final java.util.Map<java.lang.String,java.lang.Class> PROPS_MAP
Contains known props and their classes.
-
PROP_DEFAULTS
protected static final java.util.Map<java.lang.String,java.lang.Object> PROP_DEFAULTS
Contains default values for known props.
-
PROPS_NAMES
protected static final java.util.Map<java.lang.String,java.lang.String> PROPS_NAMES
Property friendly names.
-
-
Method Detail
-
getProp
public java.util.Optional<java.lang.Object> getProp(java.lang.String prop)
Return value of specified property.
-
toCSS
public java.lang.String toCSS()
Get the JFX CSS for these properties.- Returns:
- CSS String.
-
getDefaultProps
public java.util.Map<java.lang.String,java.lang.Object> getDefaultProps()
Description copied from interface:Props
Get default properties.- Specified by:
getDefaultProps
in interfaceProps
- Returns:
- Default properties map.
-
getPropsTypes
public java.util.Map<java.lang.String,java.lang.Class> getPropsTypes()
Description copied from interface:Props
Get property types.- Specified by:
getPropsTypes
in interfaceProps
- Returns:
- Map of properties to types.
-
getPropsNames
public java.util.Map<java.lang.String,java.lang.String> getPropsNames()
Description copied from interface:Props
Get property friendly names.- Specified by:
getPropsNames
in interfaceProps
- Returns:
- Map of properties to names.
-
-