Class IntervalMarker

  • All Implemented Interfaces:
    java.io.Serializable

    public class IntervalMarker
    extends AbstractMarker
    Class to create interval markers in a chart plot. An interval marker has two values, a start and an end value.
    Since:
    8.0
    See Also:
    AbstractMarker, Serialized Form
    • Constructor Detail

      • IntervalMarker

        public IntervalMarker()
        Creates a marker area with two values: the first (start value) and the second (end value). These are initialized as 0.
        Since:
        8.0
    • Method Detail

      • getFirstValue

        public double getFirstValue()
        Returns the first value (lower bound) of this marker.
        Returns:
        the firstValue.
        Since:
        8.0
      • setFirstValue

        public void setFirstValue​(double firstValue)
        Sets the start value (lower bound) of this marker.
        Parameters:
        firstValue - the start value
        Since:
        8.0
        See Also:
        getFirstValue(), setSecondValue(double)
      • getSecondValue

        public double getSecondValue()
        Returns the end value (upper bound) of this marker.
        Returns:
        the end Value.
        Since:
        8.0
      • setSecondValue

        public void setSecondValue​(double secondValue)
        Sets the end value (upper bound) of this marker.
        Parameters:
        secondValue - the end value
        Since:
        8.0
        See Also:
        getSecondValue(), setFirstValue(double)
      • getSubProperties

        protected java.lang.StringBuilder getSubProperties​(int depth)
        Returns the serialized properties of subclasses.
        Overrides:
        getSubProperties in class AbstractMarker
        Parameters:
        depth - the depth of XML indent
        Returns:
        the properties.
      • readProperties

        public void readProperties​(org.w3c.dom.Element element,
                                   Chart2 chart)
        Loads the XML properties of a marker.
        Overrides:
        readProperties in class AbstractMarker
        Parameters:
        element - DOM element to read marker properties from
        chart - the Chart this marker belongs to, not null
      • getFirstValueFormula

        public FormulaField getFirstValueFormula()
        Get the Formula which returns the first value of the marker.
        Returns:
        the firstValueFormula, can be null when no formula was set
        Since:
        11.3
      • setFirstValueFormula

        public void setFirstValueFormula​(FormulaField firstValueFormula,
                                         boolean isDate)
        Set the Formula for the first value of the marker.
        Expected type is double or datetime.
        Parameters:
        firstValueFormula - the firstValueFormula to set
        isDate - true when this is for a date-axis, so the return type of the formula is DateTime, otherwise it is NUMBER
        Throws:
        java.lang.IllegalArgumentException - if the given formula has a different type than FORMULA_PROPERTY
        Since:
        11.3
      • getSecondValueFormula

        public FormulaField getSecondValueFormula()
        Get the Formula which returns the second value for the marker.
        Returns:
        the secondValueFormula, can be null when no formula was set
        Since:
        11.3
      • setSecondValueFormula

        public void setSecondValueFormula​(FormulaField secondValueFormula,
                                          boolean isDate)
        Set the Formula for the second value of the marker.
        Parameters:
        secondValueFormula - the secondValueFormula to set
        isDate - true when this is for a date-axis, so the return type of the formula is DateTime, otherwise it is NUMBER
        Throws:
        java.lang.IllegalArgumentException - if the given formula has a different type than FORMULA_PROPERTY
        Since:
        11.3
      • isFirstValueFormulaDate

        public boolean isFirstValueFormulaDate()
        Get whether the firstValueFormula returns Date
        Returns:
        the firstValueFormulaIsDate
        Since:
        11.3
      • isSecondValueFormulaDate

        public boolean isSecondValueFormulaDate()
        Get whether the secondValueFormula returns Date
        Returns:
        the secondValueFormulaIsDate
        Since:
        11.3