|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.pavlov.randommedia.ImageIconUtilities
public final class ImageIconUtilities
Assorted utilities for ImageIcons.
Constructor Summary | |
---|---|
ImageIconUtilities()
|
Method Summary | |
---|---|
static ImageIcon |
formatImage(ImageIcon input,
int size)
Get an ImageIcon of the specified size from the given ImageIcon. |
static Image |
formatImageOnly(ImageIcon input,
int size)
Poorly named method to get an Image of the desired size from the given ImageIcon. |
static ImageIcon |
getNamedImageIcon(String myURL)
Attempts to return the named URL as an ImageIcon. |
static ImageIcon |
getNamedImageIcon(String myURL,
int size)
Attempts to return an ImageIcon of the specified size with the given URL. |
static Dimension |
getScaledDimension(Image big,
int size)
Returns a width/height pair that maintains big's aspectRatio, with neither width or height larger than size. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageIconUtilities()
Method Detail |
---|
public static Image formatImageOnly(ImageIcon input, int size)
input
- an ImageIcon
valuesize
- an int
value
Image
valuepublic static ImageIcon formatImage(ImageIcon input, int size)
input
- an ImageIcon
valuesize
- an int
value
ImageIcon
valuepublic static Dimension getScaledDimension(Image big, int size)
big
- an Image
valuesize
- an int
value
Dimension
valuepublic static ImageIcon getNamedImageIcon(String myURL, int size)
myURL
- a String
valuesize
- an int
value
ImageIcon
valuepublic static ImageIcon getNamedImageIcon(String myURL)
myURL
- a String
value
ImageIcon
value
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |