Package resources

Class Icons

java.lang.Object
resources.Icons

public class Icons extends Object
A class to get generic icons for standard actions. All methods in this class return an icon that is 16x16 unless the method name ends in another size.'
  • Field Details

    • EMPTY_ICON

      public static final ImageIcon EMPTY_ICON
    • HELP_ICON

      public static final ImageIcon HELP_ICON
    • ADD_ICON

      public static final ImageIcon ADD_ICON
    • COLLAPSE_ALL_ICON

      public static final ImageIcon COLLAPSE_ALL_ICON
    • EXPAND_ALL_ICON

      public static final ImageIcon EXPAND_ALL_ICON
    • CONFIGURE_FILTER_ICON

      public static final ImageIcon CONFIGURE_FILTER_ICON
    • DELETE_ICON

      public static final ImageIcon DELETE_ICON
    • ERROR_ICON

      public static final ImageIcon ERROR_ICON
    • NOT_ALLOWED_ICON

      public static final ImageIcon NOT_ALLOWED_ICON
    • OPEN_FOLDER_ICON

      public static final ImageIcon OPEN_FOLDER_ICON
    • REFRESH_ICON

      public static final ImageIcon REFRESH_ICON
    • SORT_ASCENDING_ICON

      public static final ImageIcon SORT_ASCENDING_ICON
    • SORT_DESCENDING_ICON

      public static final ImageIcon SORT_DESCENDING_ICON
    • STOP_ICON

      public static final ImageIcon STOP_ICON
    • STRONG_WARNING_ICON

      public static final ImageIcon STRONG_WARNING_ICON
    • LEFT_ICON

      public static final ImageIcon LEFT_ICON
    • RIGHT_ICON

      public static final ImageIcon RIGHT_ICON
    • LEFT_ALTERNATE_ICON

      public static final ImageIcon LEFT_ALTERNATE_ICON
      An version of the LEFT_ICON with a different color
    • RIGHT_ALTERNATE_ICON

      public static final ImageIcon RIGHT_ALTERNATE_ICON
      An version of the RIGHT_ICON with a different color
    • SAVE_AS

      public static final ImageIcon SAVE_AS
    • MAKE_SELECTION_ICON

      public static final ImageIcon MAKE_SELECTION_ICON
    • ARROW_DOWN_RIGHT_ICON

      public static final ImageIcon ARROW_DOWN_RIGHT_ICON
    • ARROW_UP_LEFT_ICON

      public static final ImageIcon ARROW_UP_LEFT_ICON
    • FILTER_NOT_ACCEPTED_ICON

      public static final ImageIcon FILTER_NOT_ACCEPTED_ICON
    • APPLY_BLOCKED_MATCH_ICON

      public static final ImageIcon APPLY_BLOCKED_MATCH_ICON
  • Method Details

    • isIconsReference

      public static boolean isIconsReference(String snippet)
      Returns true if the given string is a Java code snippet that references this class
      Parameters:
      snippet - the string to check
      Returns:
      true if the given string is a Java code snippet that references this class
    • getIconForIconsReference

      public static IconProvider getIconForIconsReference(String snippet)
      Returns an IconProvider for the given string value, which is usually the 'src' attribute of an IMG tag
      Parameters:
      snippet - the snippet
      Returns:
      the icon provider
    • get

      public static ImageIcon get(String iconPath)
      Gets the icon for the given icon path. The given path should be relative to the classpath. If an icon by that name can't be found, the default "bomb" icon is returned instead.

      For example, an icon named foo.png would typically be stored in the module at "{modulePath}/src/main/resources/image/foo.png". To reference that icon, use the path "images/foo.png", since "{modulePath}/src/main/resources" is in the classpath.

      Parameters:
      iconPath - the icon path (relative to the classpath)
      Returns:
      The icon referenced by that path.
    • get

      public static ImageIcon get(String iconPath, int width, int height)
      Gets the icon for the given icon path and scale it to the specifed width and height. The given path should be relative to the classpath. If an icon by that name can't be found, the default "bomb" icon is returned instead.

      For example, an icon named foo.png would typically be stored in the module at "{modulePath}/src/main/resources/image/foo.png". To reference that icon, use the path "images/foo.png", since "{modulePath}/src/main/resources" is in the classpath.

      Parameters:
      iconPath - the icon path (relative to the classpath)
      width - the desired width after scaling
      height - the desired height after scaling
      Returns:
      The icon referenced by that path.