Class RMIconUtils

java.lang.Object
com.inductiveautomation.rm.swing.RMIconUtils

public class RMIconUtils extends Object
Some useful Icon utilities and subclasses.
  • Constructor Details

    • RMIconUtils

      public RMIconUtils()
  • Method Details

    • getIcon

      public static Icon getIcon(Shape aShape, Color aColor, int aWidth, int aHeight)
      Returns an icon for the given shape, color and size.
    • getImageIcon

      public static ImageIcon getImageIcon(Shape aShape, Color aColor, int aWidth, int aHeight)
      Returns an image icon for the given shape, color and size.
    • getImageIcon

      public static ImageIcon getImageIcon(Icon anIcon)
      Returns an image icon for given icon.
    • getImageIcon

      public static ImageIcon getImageIcon(Icon anIcon, int aWidth, int aHeight)
      Returns an image icon for given icon.
    • getImage

      public static BufferedImage getImage(Icon anIcon, int aWidth, int aHeight)
      Returns an image for the given shape, image size and color.
    • setRolloverIcons

      public static void setRolloverIcons(@Nullable AbstractButton aButton, boolean doSelected)
      A convenience method for setting roll-over, pressed and selected icons for a tool bar button with just an icon.
    • setRolloverIcons

      public static void setRolloverIcons(@Nonnull AbstractButton aButton, boolean doSelected, int w, int h)
      A convenience method for setting roll-over, pressed and selected icons for a tool bar button with just an icon.
    • getCompositeIcon

      public static RMIconUtils.CompositeIcon2 getCompositeIcon(Icon anIcon1, Icon anIcon2, int anX, int aY)
      Returns a composite icon for original icon and new icon at x,y.
    • setButtonIconAsLabelIcon

      public static void setButtonIconAsLabelIcon(AbstractButton aButton)
      Set button icon.