Package quadbase.util

Interface IAnnotation

All Superinterfaces:
Cloneable, IGradientPropertySet, IGradientSupport, IPlot, IText

public interface IAnnotation extends IText, IPlot
This interface defines the requirements of an annotation object. Please call the method in quabase.util.IAnnotationSet to create a new annotation.
See Also:
  • Method Details

    • getValue

      String getValue()
      This function returns the value of the string. Combine all elements in string array and separate them with a newline character.
      Returns:
      The value of the string as a String object.
    • setValue

      void setValue(String value)
      This function sets the value of the string. Break up the string when a newline character is found. Then store the substrings in a string array.
      Parameters:
      value - The string value to set.
    • getValues

      String[] getValues()
      This function returns the value of the string array.
      Returns:
      The value of the string as a String array
    • setValues

      void setValues(String[] value)
      This function sets the value of the string array.
      Parameters:
      value - The string array value to set.
    • setVisible

      void setVisible(boolean visible)
      This function sets the object to either visible or invisible.
      Parameters:
      visible - The state of the object
    • isVisible

      boolean isVisible()
      This function returns whether both this object and the referenced object are visible
      Returns:
      visible or not
    • getReferenceObject

      IReferenceObj getReferenceObject()
      This function returns the referenced object of this annotation.
      Returns:
      the referenced object
      See Also:
    • setReferenceObject

      void setReferenceObject(IReferenceObj refObj)
      This function sets the referenced object of this annotation.
      Parameters:
      refObj - The referenced object
      See Also:
    • getRelativePosition

      Point_2D getRelativePosition()
      This function gets the relative position to the referenced object. The return value is the ratio of position different between the referenced position and the annotation position to the canvas size. If the return value is (ratioX1, ratioY1), the referenced position is (ratioX2, ratioY2) and the canvas size is (width, height), the annotation will be draw at position ( width*(ratioX1 + ratioX2), height*(ratioY1 + ratioY2) ) Note that position (0, 0) represents the lower-left corner of the chart canvas.
      Returns:
      The relative position
    • setRelativePosition

      void setRelativePosition(Point_2D relativePos)
      This function sets the relative position to the referenced object.
      Parameters:
      relativePos - The relative position
    • getxShift

      int getxShift()
      Get how much the annotation text will be offset to right or left (with negative values) from the border/background
      Returns:
      The relative offset on X axis, default 0
    • setxShift

      void setxShift(int xShift)
      Set how much the annotation text will be offset to right or left (with negative values) from the border/background
      Parameters:
      xShift - The X axis offset, accepts negative values, default 0
    • getyShift

      int getyShift()
      Get how much the annotation text will be offset to up or down (with negative values) from the border/background
      Returns:
      The relative offset on Y axis, default 0
    • setyShift

      void setyShift(int yShift)
      Set how much the annotation text will be offset to up or down (with negative values) from the border/background
      Parameters:
      yShift - The relative offset on Y axis, default 0