Class TLspLabelBoxStyle

All Implemented Interfaces:

public class TLspLabelBoxStyle extends ALspStyle
Style used to draw a box around labels: frame and background color.

It defines the following properties:

Construction of a label box style object is performed through the Builder design pattern mechanism.

Note that it is possible to use multiple TLspLabelBoxStyles in a label styler. In that case, the padding property is always defined relative to the content (text or icon) of the label. Also, the painting order is defined by the order in which the styles are passed to the styler.

  • Method Details

    • newBuilder

      public static TLspLabelBoxStyle.Builder<?> newBuilder()
      Creates a new builder with the default values.
      the new builder.
    • asBuilder

      public TLspLabelBoxStyle.Builder<?> asBuilder()
      Creates a new builder initialized with all the properties of this style.
      Specified by:
      asBuilder in class ALspStyle
      the new builder.
    • getPadding

      public int getPadding()
      Returns the padding (in pixels) between the label content (text or icon) and its frame.
      the padding between the label and its frame
    • getFrameThickness

      public float getFrameThickness()
      Returns the line width (in pixels) of the frame.

      Returns 0 if no frame should be drawn.

      the frame thickness, in pixels
    • getFrameColor

      public Color getFrameColor()
      Returns the color the frame should be drawn in. This property only has effect if getFrameThickness() is not 0.
      the color of the frame
    • isFilled

      public boolean isFilled()
      Indicates whether the label should have a non-transparent background.
      true if the label should have a non-transparent background, false otherwise.
    • getFillColor

      public Color getFillColor()
      Returns the background color of the label. This property only has effect if isFilled() is true.
      the background color of the label.
    • getHaloColor

      public Color getHaloColor()
      Gets the halo color. This property should only be used if the halo is enabled.
      the halo color
      See Also:
    • getHaloThickness

      public float getHaloThickness()
      Gets the halo thickness. If zero, there should be no halo.
      the halo thickness in pixels
      See Also:
    • isTransparent

      public boolean isTransparent()
      Description copied from class: ALspStyle
      Determines whether this style is transparent.

      Shapes that are transparent can be painted in a different paint phase than shapes that are not transparent.

      Specified by:
      isTransparent in class ALspStyle
      whether or not this style is transparent
    • equals

      public boolean equals(Object o)
      equals in class ALspStyle
    • hashCode

      public int hashCode()
      hashCode in class ALspStyle