Package edu.wpi.grip.core.util
Class Icon
- java.lang.Object
-
- edu.wpi.grip.core.util.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.
-
-
-
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 locatedname
- the name of the icontype
- 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 icontype
- 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.
-
-