|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--flatscape.util.ImageUtils
The ImageUtils class contains static utility methods related to loading and resizing images, icons, and cursors.
Copyright (c) 2001 Rutgers, The State University of New Jersey
| Method Summary | |
static java.awt.Cursor |
getCrosshairCursor(java.lang.String subImageSource,
java.lang.String cursorName)
Returns a crosshair cursor with the specified image in the lower right corner. |
static java.awt.Cursor |
getCursor(java.lang.String source,
java.awt.Point hotSpot,
java.lang.String cursorName)
Returns a cursor constructed from the specified source. |
static java.awt.Image |
getImage(java.lang.String source)
Returns an Image that has been fully loaded. |
static java.awt.Image |
getImage(java.lang.String source,
java.awt.Dimension size,
boolean allowExpand)
Returns an Image that has been resized using verifyAspectAndSize(). |
static javax.swing.ImageIcon |
getImageIcon(java.lang.String source)
Returns an ImageIcon that has been fully loaded. |
static javax.swing.ImageIcon |
getImageIcon(java.lang.String source,
java.awt.Dimension size,
boolean allowExpand)
Returns an ImageIcon that has been resized using verifyAspectAndSize(). |
static java.awt.image.RenderedImage |
getRenderedImage(java.lang.String source)
Returns a RenderedImage loaded using Java Advanced Imaging. |
static java.awt.Dimension |
verifyAspectAndSize(java.awt.Dimension original,
java.awt.Dimension desiredMax)
Returns a new Dimension that as large as possible with the same aspect ratio as the original, but is smaller or equal to in width and height as the desired maximum. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static javax.swing.ImageIcon getImageIcon(java.lang.String source)
source - A relative or absolute path or URLpublic static java.awt.Image getImage(java.lang.String source)
source - A relative or absolute path or URLpublic static java.awt.image.RenderedImage getRenderedImage(java.lang.String source)
source - A relative or absolute path or URL
public static java.awt.Dimension verifyAspectAndSize(java.awt.Dimension original,
java.awt.Dimension desiredMax)
public static java.awt.Image getImage(java.lang.String source,
java.awt.Dimension size,
boolean allowExpand)
source - A relative or absolute path or URLsize - The desired maximum sizeallowExpand - If false, image will only be contracted if necessary, never expanded
public static javax.swing.ImageIcon getImageIcon(java.lang.String source,
java.awt.Dimension size,
boolean allowExpand)
source - A relative or absolute path or URLsize - The desired maximum sizeallowExpand - If false, image will only be contracted if necessary, never expanded
public static java.awt.Cursor getCursor(java.lang.String source,
java.awt.Point hotSpot,
java.lang.String cursorName)
source - A relative or absolute path or URLhotSpot - The click location of the image
public static java.awt.Cursor getCrosshairCursor(java.lang.String subImageSource,
java.lang.String cursorName)
subImageSource - A relative or absolute path or URL
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||