Class ResourceUtils


  • public class ResourceUtils
    extends java.lang.Object
    Utility class for loading information from resources.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static @NotNull java.lang.String ALL_SPELL_SKILLS_ICON
      The resource name for the default skill face.
      static @NotNull java.lang.String APPLICATION_ICON
      The resource name for the application icon.
      static @NotNull java.lang.String NEXT_GROUP_FACE
      The resource for "Click here for next group of items" buttons.
      static @NotNull java.lang.String PREV_GROUP_FACE
      The resource for "Click here for previous group of items" buttons.
      static @NotNull java.lang.String UNKNOWN_PNG
      The resource name of the "unknown" face.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static @NotNull javax.swing.ImageIcon loadImage​(@NotNull java.lang.String name)
      Loads an image file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • UNKNOWN_PNG

        @NotNull
        public static final @NotNull java.lang.String UNKNOWN_PNG
        The resource name of the "unknown" face.
        See Also:
        Constant Field Values
      • NEXT_GROUP_FACE

        @NotNull
        public static final @NotNull java.lang.String NEXT_GROUP_FACE
        The resource for "Click here for next group of items" buttons.
        See Also:
        Constant Field Values
      • PREV_GROUP_FACE

        @NotNull
        public static final @NotNull java.lang.String PREV_GROUP_FACE
        The resource for "Click here for previous group of items" buttons.
        See Also:
        Constant Field Values
      • APPLICATION_ICON

        @NotNull
        public static final @NotNull java.lang.String APPLICATION_ICON
        The resource name for the application icon.
        See Also:
        Constant Field Values
      • ALL_SPELL_SKILLS_ICON

        @NotNull
        public static final @NotNull java.lang.String ALL_SPELL_SKILLS_ICON
        The resource name for the default skill face.
        See Also:
        Constant Field Values
    • Method Detail

      • loadImage

        @NotNull
        public static @NotNull javax.swing.ImageIcon loadImage​(@NotNull
                                                               @NotNull java.lang.String name)
                                                        throws java.io.IOException
        Loads an image file.
        Parameters:
        name - the resource name to load
        Returns:
        the image
        Throws:
        java.io.IOException - if the image cannot be loaded