public class ImageProvider
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ImageProvider.ModulateComposite
Composite for modulation.
|
| Modifier and Type | Field and Description |
|---|---|
protected static int |
ACTIVATION_SHIFT
The activation shift.
|
protected static int |
BASE_ICON_SIZE
The base icon size.
|
protected static java.awt.image.ConvolveOp |
BLUR_FILTER_X |
protected static java.awt.image.ConvolveOp |
BLUR_FILTER_Y |
protected static int |
BUTTON_SIZE
The button size.
|
static int |
DOUBLE_FRAME_TYPE
Double frame type.
|
static int |
EMPTY_FRAME_TYPE
Thick frame type.
|
protected static java.lang.String |
FONT_DIR
The font directory
|
protected static int |
FRAME_THICKNESS
The frame thickness.
|
protected static double |
GLASS_SHRINK
The glass effect shrink factor.
|
protected static java.lang.String |
GUI_DIR
The gui directory
|
protected java.awt.Font |
iconfont
The icon font used.
|
protected static java.lang.String |
IMAGE_DIR
The image directory
|
protected static double |
IMAGE_SYMBOL_INSET_FACTOR
The image symbol inset factor.
|
protected java.util.Map<java.lang.Object,java.awt.Image> |
imagecache
The image cache.
|
protected static float |
NON_HIGHLIGHT_DARKENING_FACTOR
Darkening factor for non-highlighted icons
|
protected static double |
SHADOW_SCALE |
static java.awt.Shape |
SHAPE_ELLIPSE
Ellipse base shape
|
static java.awt.Shape |
SHAPE_RECTANGLE
Rounded rectangle base shape
|
static java.awt.Shape |
SHAPE_RHOMBUS
Rhombus base shape.
|
static java.awt.Shape |
SHAPE_ROUNDED_RECTANGLE
Rounded rectangle base shape
|
static int |
THICK_FRAME_TYPE
Thick frame type.
|
protected static int |
THIN_FRAME_THICKNESS
The frame thickness factor for thin frames.
|
static int |
THIN_FRAME_TYPE
Thin frame type.
|
| Constructor and Description |
|---|
ImageProvider() |
| Modifier and Type | Method and Description |
|---|---|
javax.swing.ImageIcon |
generateFlatButtonIcon(int iconsize,
java.awt.Shape baseshape,
int frametype,
java.lang.String symbol,
java.awt.Color symbolcolor,
java.awt.Color bgcolor)
Generates a flat version of a button icon.
|
javax.swing.ImageIcon |
generateGenericButtonIcon(int iconsize,
java.awt.Shape baseshape,
int frametype,
java.lang.String symbol,
java.awt.Color symbolcolor,
java.awt.Color bgcolor,
boolean high,
boolean shift)
Generates a generic button icon.
|
javax.swing.ImageIcon |
generateGenericButtonIcon(int iconsize,
java.awt.Shape baseshape,
java.lang.String symbol,
java.awt.Color symbolcolor,
java.awt.Color bgcolor,
boolean high,
boolean shift)
Generates a generic button icon.
|
javax.swing.Icon[] |
generateGenericButtonIconSet(int iconsize,
java.awt.Shape baseshape,
int frametype,
java.lang.String symbol,
java.awt.Color symbolcolor,
java.awt.Color bgcolor)
Generates a generic button icon set in the order off, on, highlight.
|
javax.swing.Icon[] |
generateGenericButtonIconSet(int iconsize,
java.awt.Shape baseshape,
java.lang.String symbol,
java.awt.Color symbolcolor,
java.awt.Color bgcolor)
Generates a generic button icon set in the order off, on, highlight.
|
javax.swing.Icon[] |
generateGenericFlatImageIconSet(int iconsize,
int frametype,
java.lang.String symbol,
java.awt.Color symbolcolor)
Generates a generic flat image icon set in the order off, on, highlight.
|
javax.swing.Icon[] |
generateGenericFlatImageIconSet(int iconsize,
int frametype,
java.lang.String symbol,
java.awt.Color symbolcolor,
float darkeningfactor)
Generates a generic flat image icon set in the order off, on, highlight.
|
void |
loadCache(java.lang.String filepath)
Loads the image cache from a file.
|
void |
saveCache(java.lang.String filepath)
Saves the image cache to a file.
|
public static final int EMPTY_FRAME_TYPE
public static final int THICK_FRAME_TYPE
public static final int THIN_FRAME_TYPE
public static final int DOUBLE_FRAME_TYPE
public static final java.awt.Shape SHAPE_RHOMBUS
public static final java.awt.Shape SHAPE_ROUNDED_RECTANGLE
public static final java.awt.Shape SHAPE_RECTANGLE
public static final java.awt.Shape SHAPE_ELLIPSE
protected static final float NON_HIGHLIGHT_DARKENING_FACTOR
protected static final int BASE_ICON_SIZE
protected static final int ACTIVATION_SHIFT
protected static final int BUTTON_SIZE
protected static final double IMAGE_SYMBOL_INSET_FACTOR
protected static final double SHADOW_SCALE
protected static final int FRAME_THICKNESS
protected static final int THIN_FRAME_THICKNESS
protected static final double GLASS_SHRINK
protected static final java.lang.String GUI_DIR
protected static final java.lang.String IMAGE_DIR
protected static final java.lang.String FONT_DIR
protected static final java.awt.image.ConvolveOp BLUR_FILTER_X
protected static final java.awt.image.ConvolveOp BLUR_FILTER_Y
protected java.util.Map<java.lang.Object,java.awt.Image> imagecache
protected java.awt.Font iconfont
public javax.swing.Icon[] generateGenericFlatImageIconSet(int iconsize,
int frametype,
java.lang.String symbol,
java.awt.Color symbolcolor)
iconsize - The icon size.frametype - The button frame type.symbol - Symbol name or text.symbolcolor - Color of the symbol.public javax.swing.Icon[] generateGenericFlatImageIconSet(int iconsize,
int frametype,
java.lang.String symbol,
java.awt.Color symbolcolor,
float darkeningfactor)
iconsize - The icon size.frametype - The button frame type.symbol - Symbol name or text.symbolcolor - Color of the symbol.darkeningfactor - Factor by which to darken non-highlighted icons.public javax.swing.Icon[] generateGenericButtonIconSet(int iconsize,
java.awt.Shape baseshape,
java.lang.String symbol,
java.awt.Color symbolcolor,
java.awt.Color bgcolor)
iconsize - The icon size.baseshape - The base shape.symbol - Symbol name or text.bgcolor - Color of the icon.public javax.swing.Icon[] generateGenericButtonIconSet(int iconsize,
java.awt.Shape baseshape,
int frametype,
java.lang.String symbol,
java.awt.Color symbolcolor,
java.awt.Color bgcolor)
iconsize - The icon size.baseshape - The base shape.frametype - The type of frame.symbol - Symbol name or text.bgcolor - Color of the icon.public javax.swing.ImageIcon generateGenericButtonIcon(int iconsize,
java.awt.Shape baseshape,
java.lang.String symbol,
java.awt.Color symbolcolor,
java.awt.Color bgcolor,
boolean high,
boolean shift)
iconsize - The icon size.baseshape - The base shape.symbol - Symbol name or text.bgcolor - Color of the icon.high - Highlight the icon if true.shift - Shift (for pressed status) if true.public javax.swing.ImageIcon generateGenericButtonIcon(int iconsize,
java.awt.Shape baseshape,
int frametype,
java.lang.String symbol,
java.awt.Color symbolcolor,
java.awt.Color bgcolor,
boolean high,
boolean shift)
iconsize - The icon size.baseshape - The base shape.frametype - The type of frame.symbol - Symbol name or text.bgcolor - Color of the iconhigh - Highlight the icon if true.shift - Shift (for pressed status) if true.public javax.swing.ImageIcon generateFlatButtonIcon(int iconsize,
java.awt.Shape baseshape,
int frametype,
java.lang.String symbol,
java.awt.Color symbolcolor,
java.awt.Color bgcolor)
iconsize - The icon size.baseshape - The base shape.frametype - The type of frame.symbol - Symbol name or text.bgcolor - Color of the iconhigh - Highlight the icon if true.shift - Shift (for pressed status) if true.public void loadCache(java.lang.String filepath)
throws java.io.IOException
filepath - Path to the file.java.io.IOException - Exception on IO errors.public void saveCache(java.lang.String filepath)
throws java.io.IOException
filepath - Path to the file.java.io.IOException - Exception on IO errors.