Class IconUtils

java.lang.Object
uno.anahata.ai.swing.IconUtils

public class IconUtils extends Object
A utility class for handling icons.
  • Constructor Details

    • IconUtils

      public IconUtils()
  • Method Details

    • getIcon

      public static Icon getIcon(String name)
      Loads an icon from the classpath resources and scales it to a 24x24 size.
      Parameters:
      name - The name of the icon file (e.g., "attach.png").
      Returns:
      A scaled Icon, or null if the resource is not found.
    • getIcon

      public static Icon getIcon(String name, int size)
      Loads an icon from the classpath resources and scales it to the specified size.
      Parameters:
      name - The name of the icon file.
      size - The size (width and height) to scale the icon to.
      Returns:
      A scaled Icon, or null if the resource is not found.