Class SmallIconButton

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
com.inductiveautomation.ignition.client.util.gui.SmallIconButton
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants

public class SmallIconButton extends JLabel
A component that displays a small icon, and acts like a little miniature button. Has built-in support for loading any of the glyphicons icons.
See Also:
  • Field Details

    • icon

      protected ImageIcon icon
    • over

      protected ImageIcon over
    • pressed

      protected boolean pressed
  • Constructor Details

    • SmallIconButton

      public SmallIconButton(String name)
      Creates a small icon button using the name of one of the images under images/small. Do not need the ".png" suffix.
  • Method Details

    • loadIcon

      public static ImageIcon loadIcon(String name)
    • createGrayedImage

      public static ImageIcon createGrayedImage(ImageIcon i, int p)
    • paint

      public void paint(Graphics g)
      Overrides:
      paint in class JComponent
    • onClick

      protected void onClick()
      Optional way to implement the small icon button instead of adding mouse listeners, override and implement this