Class TextIcon

java.lang.Object
com.github.weisj.darklaf.icons.TextIcon
All Implemented Interfaces:
DerivableIcon<TextIcon>, Icon

public class TextIcon extends Object implements Icon, DerivableIcon<TextIcon>
  • Constructor Details

    • TextIcon

      public TextIcon(String text, Color color, Font font, int width, int height)
    • TextIcon

      public TextIcon(String text, Color color, Font font, int width, int height, int textOffset)
  • Method Details

    • paintIcon

      public void paintIcon(Component c, Graphics gg, int x, int y)
      Specified by:
      paintIcon in interface Icon
    • getIconWidth

      public int getIconWidth()
      Specified by:
      getIconWidth in interface Icon
    • getIconHeight

      public int getIconHeight()
      Specified by:
      getIconHeight in interface Icon
    • derive

      public TextIcon derive(int width, int height)
      Description copied from interface: DerivableIcon
      Derive a new icon with the specified size.
      Specified by:
      derive in interface DerivableIcon<TextIcon>
      Parameters:
      width - the new width
      height - the new height.
      Returns:
      the derived icon.