Documentation of 'smile.plot.Label' Java class
Label
smile.plot

Class Label



  • public class Label
    extends Shape
    Label is a single line text.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Label(double... coord)
      Constructor.
      Label(java.lang.String text, double[] coord)
      Constructor.
      Label(java.lang.String text, double rotation, double[] coord)
      Constructor.
      Label(java.lang.String text, double horizontalReference, double verticalReference, double[] coord)
      Constructor.
      Label(java.lang.String text, double horizontalReference, double verticalReference, double rotation, double[] coord)
      Constructor.
    • Constructor Detail

      • Label

        public Label(java.lang.String text,
                     double[] coord)
        Constructor.
      • Label

        public Label(java.lang.String text,
                     double rotation,
                     double[] coord)
        Constructor.
      • Label

        public Label(java.lang.String text,
                     double horizontalReference,
                     double verticalReference,
                     double[] coord)
        Constructor.
      • Label

        public Label(java.lang.String text,
                     double horizontalReference,
                     double verticalReference,
                     double rotation,
                     double[] coord)
        Constructor. The reference position of coordinates respected to dimension of text. (0.5, 0.5) is center, (0, 0) is lower left, (0, 1) is upper left, etc.
      • Label

        public Label(double... coord)
        Constructor. Use coordinates as text.
    • Method Detail

      • setText

        public Label setText(java.lang.String text)
        Set the text of label.
      • getText

        public java.lang.String getText()
        Returns the text of label.
      • setCoordinate

        public Label setCoordinate(double... coord)
        Set the coordinate of label.
      • getCoordinate

        public double[] getCoordinate()
        Returns the coordinates of label.
      • setRotation

        public Label setRotation(double angle)
        Set the rotation angel of label.
      • getRotation

        public double getRotation()
        Returns the rotation angel of label.
      • setFont

        public Label setFont(java.awt.Font font)
        Set the font of label.
      • getFont

        public java.awt.Font getFont()
        Returns the font of label.
      • paint

        public void paint(Graphics g)
        Description copied from class: Shape
        Draw the component with given graphics object.
        Specified by:
        paint in class Shape
      • coordToString

        public static java.lang.String coordToString(double... c)
        Convert coordinate to a string.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.