Documentation of 'org.jfree.chart.annotations.CategoryTextAnnotation' Java class
CategoryTextAnnotation
org.jfree.chart.annotations

Class CategoryTextAnnotation

    • Constructor Detail

      • CategoryTextAnnotation

        public CategoryTextAnnotation(java.lang.String text,
                                      java.lang.Comparable category,
                                      double value)
        Creates a new annotation to be displayed at the given location.
        Parameters:
        text - the text (null not permitted).
        category - the category (null not permitted).
        value - the value.
    • Method Detail

      • getCategory

        public java.lang.Comparable getCategory()
        Returns the category.
        Returns:
        The category (never null).
        See Also:
        setCategory(Comparable)
      • setCategory

        public void setCategory(java.lang.Comparable category)
        Sets the category that the annotation attaches to and sends an AnnotationChangeEvent to all registered listeners.
        Parameters:
        category - the category (null not permitted).
        See Also:
        getCategory()
      • getValue

        public double getValue()
        Returns the value that the annotation attaches to.
        Returns:
        The value.
        See Also:
        setValue(double)
      • setValue

        public void setValue(double value)
        Sets the value and sends an AnnotationChangeEvent to all registered listeners.
        Parameters:
        value - the value.
        See Also:
        getValue()
      • draw

        public void draw(java.awt.Graphics2D g2,
                         CategoryPlot plot,
                         java.awt.geom.Rectangle2D dataArea,
                         CategoryAxis domainAxis,
                         ValueAxis rangeAxis)
        Draws the annotation.
        Specified by:
        draw in interface CategoryAnnotation
        Parameters:
        g2 - the graphics device.
        plot - the plot.
        dataArea - the data area.
        domainAxis - the domain axis.
        rangeAxis - the range axis.
      • equals

        public boolean equals(java.lang.Object obj)
        Tests this object for equality with another.
        Overrides:
        equals in class TextAnnotation
        Parameters:
        obj - the object (null permitted).
        Returns:
        true or false.
      • hashCode

        public int hashCode()
        Returns a hash code for this instance.
        Overrides:
        hashCode in class TextAnnotation
        Returns:
        A hash code.
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Returns a clone of the annotation.
        Specified by:
        clone in interface org.jfree.util.PublicCloneable
        Overrides:
        clone in class AbstractAnnotation
        Returns:
        A clone.
        Throws:
        java.lang.CloneNotSupportedException - this class will not throw this exception, but subclasses (if any) might.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.