Class Icon


  • public final class Icon
    extends java.lang.Object
    Utility class for fetching icon streams.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.InputStream getStream()
      Get a newly constructed stream.
      static Icon iconStream​(java.lang.String name)
      Gets an image stream for an icon.
      static Icon iconStream​(java.lang.String name, java.lang.String type)
      Gets an image stream for an icon.
      static Icon iconStream​(java.lang.String path, java.lang.String name, java.lang.String type)
      Gets an image stream for an icon.
      • Methods inherited from class java.lang.Object

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

      • iconStream

        public static Icon iconStream​(java.lang.String path,
                                      java.lang.String name,
                                      java.lang.String type)
        Gets an image stream for an icon.
        Parameters:
        path - the directory where the icon is located
        name - the name of the icon
        type - the type of the icon (".png", ".jpg", etc.)
        Returns:
        a stream for the given icon, or null if no image by that name exists
      • iconStream

        public static Icon iconStream​(java.lang.String name,
                                      java.lang.String type)
        Gets an image stream for an icon. Will look for the image at /edu/wpi/grip/ui/icons/{name}.{type}
        Parameters:
        name - the name of the icon
        type - the type of the icon (".png", ".jpg", etc.)
        Returns:
        a stream for the given icon, or null if no image by that name exists
      • iconStream

        public static Icon iconStream​(java.lang.String name)
        Gets an image stream for an icon. Will look for the image at /edu/wpi/grip/ui/icons/{name}.png
        Parameters:
        name - the name of the icon
        Returns:
        a stream for the given icon, or null if no image by that name exists
      • getStream

        public java.io.InputStream getStream()
        Get a newly constructed stream.