java.lang.Object
com.inductiveautomation.ignition.designer.gui.IconUtil

public class IconUtil extends Object
  • Field Details

  • Method Details

    • getIcon

      @Deprecated public static ImageIcon getIcon(String name, String category)
      Deprecated.
      Categories are no longer used
    • getIcon

      @Deprecated public static ImageIcon getIcon(String name, String category, String size)
      Deprecated.
      Categories are no longer used.
    • getIcon

      @Deprecated public static ImageIcon getIcon(String name, String category, IconUtil.Size size)
      Deprecated.
      Categories are no longer used.
    • getIcon

      @Deprecated public static ImageIcon getIcon(String name, String category, String size, String style)
      Deprecated.
      Categories are no longer used.
    • getIcon

      public static ImageIcon getIcon(String name)
    • getIcon

      public static ImageIcon getIcon(String name, IconUtil.Size size)
    • getRootIcon

      public static ImageIcon getRootIcon(String path)
      Loads the image found at /images/{path}
    • getRootIconScaled

      public static ImageIcon getRootIconScaled(String path, int size)
    • getRootIconScaled

      public static ImageIcon getRootIconScaled(Class relativeClass, String path, int size)
    • getGlyphIcon

      public static ImageIcon getGlyphIcon(String number, String name, int size)
    • getRootIcon

      public static ImageIcon getRootIcon(Class relativeClass, String path)
      Retrieves an image located in the specified class's *.jar file. It attempts to load the image by looking for it at: "/images/path"
    • scaleIcon

      public static Icon scaleIcon(Icon icon, int height, float opacity)
    • scaleIcon

      public static ImageIcon scaleIcon(ImageIcon icon, int height, float opacity)
      Scales an icon to the given height. The width will be proportional. Opacity can range from [0.0-transparent] to [1.0-opaque]
    • scaleIcon

      public static ImageIcon scaleIcon(String iconName, int height, float opacity)
    • scaleIcon

      public static ImageIcon scaleIcon(String iconName, IconUtil.Size size, int height, float opacity)
    • applyBadge

      public static ImageIcon applyBadge(Icon base, Icon badge)
    • getSelected

      public static Icon getSelected(Icon icon)
    • getFocused

      public static Icon getFocused(Icon icon)
    • getDisabled

      public static Icon getDisabled(Icon icon)
    • getInherited

      public static Icon getInherited(Icon icon)
    • getCheckPath

      public static GeneralPath getCheckPath()
      Returns the Ignition checkmark logo as a GeneralPath, unless this build is a white label build, in which case it returns null.
    • createColorizedImage

      public static BufferedImage createColorizedImage(Image image, Color color)
      Creates a BufferedImage will all the pixels replaced by the specified color. This is used to create versions of icons from an existing icon, for which icon variants are not provided (inherited, overridden icons eg).
      Parameters:
      image - Source image for which all pixels will have its colors replaced.
      color - The replacement color.
      Returns:
      BufferedImage with all pixels of the specified color.
    • replaceAllColorsWith

      public static void replaceAllColorsWith(BufferedImage image, Color color)
      For a provided image, will replace all pixels in the image with the provided color, while preserving the alpha values.
      Parameters:
      image - The image for pixel color replacement
      color - The color all pixels will be replaced with