Package org.n52.io.style
Class Style
java.lang.Object
org.n52.io.style.Style
Aggregates common style options of multiple timeseries to render them on one
chart.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetColor()(package private) ObjectgetProperty(String property) (package private) Object[]getPropertyAsArray(String property) (package private) booleangetPropertyAsBoolean(String property) (package private) doublegetPropertyAsDouble(String property) (package private) intgetPropertyAsInt(String property) (package private) StringgetPropertyAsString(String property) (package private) booleanhasProperty(String property) (package private) voidsetProperties(Map<String, String> properties) Sets the style properties.
-
Field Details
-
PARAMETER_COLOR
- See Also:
-
PARAMETER_INTERVAL
- See Also:
-
VALUE_INTERVAL_BY_MONTH
- See Also:
-
VALUE_INTERVAL_BY_WEEK
- See Also:
-
VALUE_INTERVAL_BY_DAY
- See Also:
-
VALUE_INTERVAL_BY_HOUR
- See Also:
-
-
Constructor Details
-
Style
public Style()
-
-
Method Details
-
getColor
- Returns:
- a 6-digit hex color. If not set a random color will be returned.
-
getProperty
-
getPropertyAsString
-
getPropertyAsDouble
- Parameters:
property- the property name.- Returns:
- the property value as double.
- Throws:
NullPointerException- if properties were not set (which means that default values should be expected).NumberFormatException- if property value is not a double.- See Also:
-
getPropertyAsInt
- Parameters:
property- the property name.- Returns:
- the property value as int.
- Throws:
NullPointerException- if properties were not set (which means that default values should be expected).NumberFormatException- if property value is not an integer.- See Also:
-
getPropertyAsBoolean
- Parameters:
property- the property name.- Returns:
- the property value as boolean.
- Throws:
NullPointerException- if properties were not set (which means that default values should be expected).- See Also:
-
getPropertyAsArray
-
hasProperty
-
getProperties
-
setProperties
Sets the style properties. If not set ornullthe default properties are used. However, default styles can be random values and should not be expected to be reproducable.- Parameters:
properties- style options. Ifnullor not set default values are chose.
-