Class Style

  • Direct Known Subclasses:
    BarStyle, LineStyle

    public abstract class Style
    extends Object
    Aggregates common style options of multiple timeseries to render them on one chart.
    • Constructor Detail

      • Style

        public Style()
    • Method Detail

      • getColor

        public String getColor()
        Returns:
        a 6-digit hex color. If not set a random color will be returned.
      • getPropertyAsString

        String getPropertyAsString​(String property)
      • getPropertyAsDouble

        double getPropertyAsDouble​(String property)
        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:
        hasProperty(String)
      • getPropertyAsInt

        int getPropertyAsInt​(String property)
        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:
        hasProperty(String)
      • getPropertyAsBoolean

        boolean getPropertyAsBoolean​(String property)
        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:
        hasProperty(String)
      • getPropertyAsArray

        Object[] getPropertyAsArray​(String property)
      • hasProperty

        boolean hasProperty​(String property)
      • setProperties

        void setProperties​(Map<String,​String> properties)
        Sets the style properties. If not set or null the default properties are used. However, default styles can be random values and should not be expected to be reproducable.
        Parameters:
        properties - style options. If null or not set default values are chose.