Class TextAnnotation

    • Constructor Detail

      • TextAnnotation

        protected TextAnnotation​(java.lang.String text)
        Creates a text annotation with default settings.
        Parameters:
        text - the text (null not permitted).
    • Method Detail

      • getText

        public java.lang.String getText()
        Returns the text for the annotation.
        Returns:
        The text (never null).
        See Also:
        setText(String)
      • setText

        public void setText​(java.lang.String text)
        Sets the text for the annotation and sends an AnnotationChangeEvent to all registered listeners.
        Parameters:
        text - the text (null not permitted).
        See Also:
        getText()
      • getFont

        public java.awt.Font getFont()
        Returns the font for the annotation.
        Returns:
        The font (never null).
        See Also:
        setFont(Font)
      • setFont

        public void setFont​(java.awt.Font font)
        Sets the font for the annotation and sends an AnnotationChangeEvent to all registered listeners.
        Parameters:
        font - the font (null not permitted).
        See Also:
        getFont()
      • getPaint

        public java.awt.Paint getPaint()
        Returns the paint for the annotation.
        Returns:
        The paint (never null).
        See Also:
        setPaint(Paint)
      • setPaint

        public void setPaint​(java.awt.Paint paint)
        Sets the paint for the annotation and sends an AnnotationChangeEvent to all registered listeners.
        Parameters:
        paint - the paint (null not permitted).
        See Also:
        getPaint()
      • setTextAnchor

        public void setTextAnchor​(org.jfree.ui.TextAnchor anchor)
        Sets the text anchor (the point on the text bounding rectangle that is aligned to the (x, y) coordinate of the annotation) and sends an AnnotationChangeEvent to all registered listeners.
        Parameters:
        anchor - the anchor point (null not permitted).
        See Also:
        getTextAnchor()
      • equals

        public boolean equals​(java.lang.Object obj)
        Tests this object for equality with an arbitrary object.
        Overrides:
        equals in class java.lang.Object
        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 java.lang.Object
        Returns:
        A hash code.