Class Style

java.lang.Object
org.n52.io.style.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.
  • Field Details

  • Constructor Details

    • Style

      public Style()
  • Method Details

    • getColor

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

      Object getProperty(String property)
    • 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:
    • 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:
    • 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:
    • getPropertyAsArray

      Object[] getPropertyAsArray(String property)
    • hasProperty

      boolean hasProperty(String property)
    • getProperties

      Map<String,String> getProperties()
    • 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.