|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openide.util.ImageUtilities
public final class ImageUtilities
Useful static methods for manipulation with images/icons, results are cached.
Method Summary | |
---|---|
static java.awt.Image |
addToolTipToImage(java.awt.Image image,
java.lang.String text)
Add text to tool tip for given image (creates new or returns cached, original remains unmodified) Text can contain HTML tags e.g. |
static java.awt.Image |
assignToolTipToImage(java.awt.Image image,
java.lang.String text)
Assign tool tip text to given image (creates new or returns cached, original remains unmodified) Text can contain HTML tags e.g. |
static java.lang.String |
getImageToolTip(java.awt.Image image)
Get tool tip text for given image |
static java.awt.Image |
icon2Image(javax.swing.Icon icon)
Converts given icon to a Image . |
static javax.swing.Icon |
image2Icon(java.awt.Image image)
Converts given image to an icon. |
static java.awt.Image |
loadImage(java.lang.String resourceID)
Loads an image from the specified resource ID. |
static java.awt.Image |
loadImage(java.lang.String resource,
boolean localized)
Loads an image based on resource path. |
static javax.swing.ImageIcon |
loadImageIcon(java.lang.String resource,
boolean localized)
Loads an icon based on resource path. |
static java.awt.Image |
mergeImages(java.awt.Image image1,
java.awt.Image image2,
int x,
int y)
This method merges two images into the new one. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static final java.awt.Image loadImage(java.lang.String resourceID)
resourceID
- resource path of the icon (no initial slash)
public static final java.awt.Image loadImage(java.lang.String resource, boolean localized)
loadImage(String)
but may do a localized search.
For example, requesting org/netbeans/modules/foo/resources/foo.gif
might actually find org/netbeans/modules/foo/resources/foo_ja.gif
or org/netbeans/modules/foo/resources/foo_mybranding.gif.
Caching of loaded images can be used internally to improve performance.
resource
- resource path of the image (no initial slash)localized
- true for localized search
public static final javax.swing.ImageIcon loadImageIcon(java.lang.String resource, boolean localized)
loadImage(String, boolean)
, returns ImageIcon instead of Image.
resource
- resource path of the icon (no initial slash)localized
- localized resource should be used
public static final java.awt.Image mergeImages(java.awt.Image image1, java.awt.Image image2, int x, int y)
image1
- underlying imageimage2
- second imagex
- x position of top-left cornery
- y position of top-left corner
public static final javax.swing.Icon image2Icon(java.awt.Image image)
image
- to be converted
public static final java.awt.Image icon2Image(javax.swing.Icon icon)
Image
.
icon
- Icon
to be converted.public static final java.awt.Image assignToolTipToImage(java.awt.Image image, java.lang.String text)
image
- image to which tool tip should be settext
- tool tip text
public static final java.lang.String getImageToolTip(java.awt.Image image)
image
- image which is asked for tool tip text
public static final java.awt.Image addToolTipToImage(java.awt.Image image, java.lang.String text)
text
- text to add to tool tip
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |