Class Label


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

    Constructors
    Constructor
    Description
    Label(String text, double[] coordinates, double horizontalReference, double verticalReference, double rotation, Font font, Color color)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Label
    of(double... coordinates)
    Creates a black label with coordinates as text.
    static Label
    of(String text, double[] coordinates)
    Creates a black label centered at the coordinates.
    static Label
    of(String text, double[] coordinates, double horizontalReference, double verticalReference, double rotation)
    Creates a black label with system default font.
    void
    Draws the shape.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Label

      public Label(String text, double[] coordinates, double horizontalReference, double verticalReference, double rotation, Font font, Color color)
      Constructor.
  • Method Details

    • paint

      public void paint(Graphics g)
      Description copied from class: Shape
      Draws the shape.
      Specified by:
      paint in class Shape
    • of

      public static Label of(String text, double[] coordinates)
      Creates a black label centered at the coordinates.
    • of

      public static Label of(double... coordinates)
      Creates a black label with coordinates as text.
    • of

      public static Label of(String text, double[] coordinates, double horizontalReference, double verticalReference, double rotation)
      Creates a black label with system default font.