Class Label


  • public class Label
    extends java.lang.Object
    Position, size and content of a label.
    • Constructor Detail

      • Label

        public Label​(float graphicOffset,
                     java.awt.font.TextLayout labelLayout,
                     java.awt.Graphics2D graphics2D)
        Constructor.
        Parameters:
        graphicOffset - Position offset.
        labelLayout - Layout for the label.
        graphics2D - Where it is going to be rendered (more accurate size computation
    • Method Detail

      • getRotatedHeight

        public static float getRotatedHeight​(java.awt.Dimension dimension,
                                             float angle)
        Parameters:
        dimension - Unrotated dimension
        angle - Angle
        Returns:
        The height of the rotated label
      • getRotatedWidth

        public static float getRotatedWidth​(java.awt.Dimension dimension,
                                            float angle)
        Parameters:
        dimension - Unrotated dimension
        angle - Angle
        Returns:
        The width of the rotated label
      • getWidth

        public final float getWidth()
      • getHeight

        public final float getHeight()
      • getGraphicOffset

        public final float getGraphicOffset()
      • getLabelLayout

        public final java.awt.font.TextLayout getLabelLayout()
      • getRotatedWidth

        public float getRotatedWidth​(float angle)
        Parameters:
        angle - Angle
        Returns:
        The width of the rotated label
      • getRotatedHeight

        public float getRotatedHeight​(float angle)
        Parameters:
        angle - Angle
        Returns:
        The height of the rotated label