Class SmallFontHelpTextLabel

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
com.formdev.flatlaf.extras.components.FlatLabel
megamek.common.ui.SmallFontHelpTextLabel
All Implemented Interfaces:
com.formdev.flatlaf.extras.components.FlatComponentExtension, com.formdev.flatlaf.extras.components.FlatStyleableComponent, ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants

public class SmallFontHelpTextLabel extends com.formdev.flatlaf.extras.components.FlatLabel
This JLabel is a specialized small-text label for use as a help/info text to be shown directly in a GUI, e.g. under an input field. It is useful only for short texts but much easier to notice than a tooltip.
See Also:
  • Constructor Details

    • SmallFontHelpTextLabel

      public SmallFontHelpTextLabel(String text)
      Constructs a help text label with the given text. The label uses a small font and is disabled, meaning its text is greyed out. By default, the label uses an EmptyBorder with 4 thickness on the bottom and 0 elsewhere (the border can be replaced).
      Parameters:
      text - The text to show
    • SmallFontHelpTextLabel

      public SmallFontHelpTextLabel()
      Constructs an empty help text label. The label uses a small font and is disabled, meaning its text is greyed out. By default, the label uses an EmptyBorder with 4 thickness on the bottom and 0 elsewhere (the border can be replaced).
    • SmallFontHelpTextLabel

      public SmallFontHelpTextLabel(int horizontalAlignment)
      Constructs an empty help text label with the given alignment, e.g. SwingConstants.CENTER. The label uses a small font and is disabled, meaning its text is greyed out. By default, the label uses an EmptyBorder with 4 thickness on the bottom and 0 elsewhere (the border can be replaced). The default * horizontal alignment is (as with JLabel) SwingConstants.LEADING.
    • SmallFontHelpTextLabel

      public SmallFontHelpTextLabel(String text, int horizontalAlignment)
      Constructs an empty help text label with the given text and the given alignment, e.g. SwingConstants.CENTER. The label uses a small font and is disabled, meaning its text is greyed out. By default, the label uses an EmptyBorder with 4 thickness on the bottom and 0 elsewhere (the border can be replaced). The default horizontal alignment is (as with JLabel) SwingConstants.LEADING.