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 MODIFIED

      public static final Icon EMPTY_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon EMPTY_ICON
      +static javax.swing.Icon EMPTY_ICON
    • HELP_ICON MODIFIED

      public static final Icon HELP_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon HELP_ICON
      +static javax.swing.Icon HELP_ICON
    • ADD_ICON MODIFIED

      public static final Icon ADD_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon ADD_ICON
      +static javax.swing.Icon ADD_ICON
    • COPY_ICON NEW

      public static final Icon COPY_ICON
    • CUT_ICON NEW

      public static final Icon CUT_ICON
    • PASTE_ICON NEW

      public static final Icon PASTE_ICON
    • COLLAPSE_ALL_ICON MODIFIED

      public static final Icon COLLAPSE_ALL_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon COLLAPSE_ALL_ICON
      +static javax.swing.Icon COLLAPSE_ALL_ICON
    • EXPAND_ALL_ICON MODIFIED

      public static final Icon EXPAND_ALL_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon EXPAND_ALL_ICON
      +static javax.swing.Icon EXPAND_ALL_ICON
    • CONFIGURE_FILTER_ICON MODIFIED

      public static final Icon CONFIGURE_FILTER_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon CONFIGURE_FILTER_ICON
      +static javax.swing.Icon CONFIGURE_FILTER_ICON
    • CLEAR_ICON NEW

      public static final Icon CLEAR_ICON
    • DELETE_ICON MODIFIED

      public static final Icon DELETE_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon DELETE_ICON
      +static javax.swing.Icon DELETE_ICON
    • ERROR_ICON MODIFIED

      public static final Icon ERROR_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon ERROR_ICON
      +static javax.swing.Icon ERROR_ICON
    • HOME_ICON NEW

      public static final Icon HOME_ICON
    • NOT_ALLOWED_ICON MODIFIED

      public static final Icon NOT_ALLOWED_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon NOT_ALLOWED_ICON
      +static javax.swing.Icon NOT_ALLOWED_ICON
    • OPEN_FOLDER_ICON MODIFIED

      public static final Icon OPEN_FOLDER_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon OPEN_FOLDER_ICON
      +static javax.swing.Icon OPEN_FOLDER_ICON
    • CLOSED_FOLDER_ICON NEW

      public static final Icon CLOSED_FOLDER_ICON
    • REFRESH_ICON MODIFIED

      public static final Icon REFRESH_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon REFRESH_ICON
      +static javax.swing.Icon REFRESH_ICON
    • SORT_ASCENDING_ICON MODIFIED

      public static final Icon SORT_ASCENDING_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon SORT_ASCENDING_ICON
      +static javax.swing.Icon SORT_ASCENDING_ICON
    • SORT_DESCENDING_ICON MODIFIED

      public static final Icon SORT_DESCENDING_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon SORT_DESCENDING_ICON
      +static javax.swing.Icon SORT_DESCENDING_ICON
    • STOP_ICON MODIFIED

      public static final Icon STOP_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon STOP_ICON
      +static javax.swing.Icon STOP_ICON
    • STRONG_WARNING_ICON MODIFIED

      public static final Icon STRONG_WARNING_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon STRONG_WARNING_ICON
      +static javax.swing.Icon STRONG_WARNING_ICON
    • WARNING_ICON NEW

      public static final Icon WARNING_ICON
    • INFO_ICON NEW

      public static final Icon INFO_ICON
    • LEFT_ICON MODIFIED

      public static final Icon LEFT_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon LEFT_ICON
      +static javax.swing.Icon LEFT_ICON
    • RIGHT_ICON MODIFIED

      public static final Icon RIGHT_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon RIGHT_ICON
      +static javax.swing.Icon RIGHT_ICON
    • UP_ICON NEW

      public static final Icon UP_ICON
    • DOWN_ICON NEW

      public static final Icon DOWN_ICON
    • LEFT_ALTERNATE_ICON MODIFIED

      public static final Icon LEFT_ALTERNATE_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon LEFT_ALTERNATE_ICON
      +static javax.swing.Icon LEFT_ALTERNATE_ICON
      An version of the LEFT_ICON with a different color
    • RIGHT_ALTERNATE_ICON MODIFIED

      public static final Icon RIGHT_ALTERNATE_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon RIGHT_ALTERNATE_ICON
      +static javax.swing.Icon RIGHT_ALTERNATE_ICON
      An version of the RIGHT_ICON with a different color
    • SAVE_ICON NEW

      public static final Icon SAVE_ICON
    • SAVE_AS_ICON NEW

      public static final Icon SAVE_AS_ICON
    • MAKE_SELECTION_ICON MODIFIED

      public static final Icon MAKE_SELECTION_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon MAKE_SELECTION_ICON
      +static javax.swing.Icon MAKE_SELECTION_ICON
    • ARROW_DOWN_RIGHT_ICON MODIFIED

      public static final Icon ARROW_DOWN_RIGHT_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon ARROW_DOWN_RIGHT_ICON
      +static javax.swing.Icon ARROW_DOWN_RIGHT_ICON
    • ARROW_UP_LEFT_ICON MODIFIED

      public static final Icon ARROW_UP_LEFT_ICON
      type: ImageIcon → Icon
      -static javax.swing.ImageIcon ARROW_UP_LEFT_ICON
      +static javax.swing.Icon ARROW_UP_LEFT_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 specified 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.