Class ValueMarker

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class ValueMarker
    extends Marker
    A marker that represents a single value. Markers can be added to plots to highlight specific values.
    See Also:
    Serialized Form
    • Field Detail

      • value

        private double value
        The value.
    • Constructor Detail

      • ValueMarker

        public ValueMarker​(double value)
        Creates a new marker.
        Parameters:
        value - the value.
      • ValueMarker

        public ValueMarker​(double value,
                           java.awt.Paint paint,
                           java.awt.Stroke stroke)
        Creates a new marker.
        Parameters:
        value - the value.
        paint - the paint (null not permitted).
        stroke - the stroke (null not permitted).
      • ValueMarker

        public ValueMarker​(double value,
                           java.awt.Paint paint,
                           java.awt.Stroke stroke,
                           java.awt.Paint outlinePaint,
                           java.awt.Stroke outlineStroke,
                           float alpha)
        Creates a new value marker.
        Parameters:
        value - the value.
        paint - the paint (null not permitted).
        stroke - the stroke (null not permitted).
        outlinePaint - the outline paint (null permitted).
        outlineStroke - the outline stroke (null permitted).
        alpha - the alpha transparency (in the range 0.0f to 1.0f).
    • Method Detail

      • getValue

        public double getValue()
        Returns the value.
        Returns:
        The value.
        See Also:
        setValue(double)
      • setValue

        public void setValue​(double value)
        Sets the value for the marker and sends a MarkerChangeEvent to all registered listeners.
        Parameters:
        value - the value.
        See Also:
        getValue()
      • equals

        public boolean equals​(java.lang.Object obj)
        Tests this marker for equality with an arbitrary object. This method returns true if:
        • obj is not null;
        • obj is an instance of ValueMarker;
        • obj has the same value as this marker;
        • super.equals(obj) returns true.
        Overrides:
        equals in class Marker
        Parameters:
        obj - the object (null permitted).
        Returns:
        A boolean.
      • canEqual

        public boolean canEqual​(java.lang.Object other)
        Ensures symmetry between super/subclass implementations of equals. For more detail, see http://jqno.nl/equalsverifier/manual/inheritance.
        Overrides:
        canEqual in class Marker
        Parameters:
        other - Object
        Returns:
        true ONLY if the parameter is THIS class type
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Marker