public abstract class IconObject extends Object implements IIcon
IIcon.ImageList, IIcon.SizedIcon
Modifier and Type | Field and Description |
---|---|
int[] |
allowedSizes
This is the allowed icon sizes which is initially set to defaultIconSizes.
|
static int[] |
defaultIconSizes
This is the default allowed icon sizes assigned to IconObject objects (Icon).
|
static int[] |
oldWindowsDefaultIconSizes
This is the windows standard icon sizes.
|
OPTION_DONT_LIMIT_TO_ALLOWED_SIZES, OPTION_GET_DIMENSIONS_ONLY, OPTION_SCALE_DOWN_ONLY, OPTION_SCALE_UP_ONLY
Constructor and Description |
---|
IconObject() |
Modifier and Type | Method and Description |
---|---|
protected int |
adjustHeight(int height,
int getOptions) |
protected int |
adjustWidth(int width,
int getOptions) |
protected void |
cacheDimension(int width,
int height,
int scaleOptions,
Dimension imageSize) |
protected void |
cacheImage(int width,
int height,
int scaleOptions,
Drawable image) |
protected void |
clear() |
void |
draw(Graphics g,
int x,
int y,
int width,
int height,
int drawOptions,
int scaleOptions) |
protected int |
getAllowedSizeFor(int size) |
protected boolean |
getCachedDimension(int width,
int height,
int scaleOptions,
Dimension dest) |
protected Drawable |
getCachedImage(int width,
int height,
int scaleOptions) |
Drawable |
getDrawableFor(int width,
int height) |
void |
releaseDrawable(Drawable imageFromGetImageFor)
Call this when you no longer need the image returned from getDrawableFor().
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDimensionsFor, getDrawableFor, hasExactMatchFor
public static int[] oldWindowsDefaultIconSizes
public static int[] defaultIconSizes
public int[] allowedSizes
protected int getAllowedSizeFor(int size)
protected int adjustWidth(int width, int getOptions)
protected int adjustHeight(int height, int getOptions)
protected void clear()
protected void cacheImage(int width, int height, int scaleOptions, Drawable image)
protected void cacheDimension(int width, int height, int scaleOptions, Dimension imageSize)
protected Drawable getCachedImage(int width, int height, int scaleOptions)
protected boolean getCachedDimension(int width, int height, int scaleOptions, Dimension dest)
public final Drawable getDrawableFor(int width, int height)
public void draw(Graphics g, int x, int y, int width, int height, int drawOptions, int scaleOptions)
public void releaseDrawable(Drawable imageFromGetImageFor)
IIcon
releaseDrawable
in interface IIcon
imageFromGetImageFor
- the image returned by getImageFor().