Package jadex.bpmn.editor.gui
Class ImageProvider
- java.lang.Object
-
- jadex.bpmn.editor.gui.ImageProvider
-
public class ImageProvider extends java.lang.Object
Class for providing images, either stored or generated, with a cache.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
ImageProvider.ModulateComposite
Composite for modulation.
-
Field Summary
Fields Modifier and Type Field 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 directoryprotected 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 directoryprotected java.awt.Font
iconfont
The icon font used.protected static java.lang.String
IMAGE_DIR
The image directoryprotected 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 iconsprotected static double
SHADOW_SCALE
static java.awt.Shape
SHAPE_ELLIPSE
Ellipse base shapestatic java.awt.Shape
SHAPE_RECTANGLE
Rounded rectangle base shapestatic java.awt.Shape
SHAPE_RHOMBUS
Rhombus base shape.static java.awt.Shape
SHAPE_ROUNDED_RECTANGLE
Rounded rectangle base shapestatic 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 Summary
Constructors Constructor Description ImageProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
EMPTY_FRAME_TYPE
public static final int EMPTY_FRAME_TYPE
Thick frame type.- See Also:
- Constant Field Values
-
THICK_FRAME_TYPE
public static final int THICK_FRAME_TYPE
Thick frame type.- See Also:
- Constant Field Values
-
THIN_FRAME_TYPE
public static final int THIN_FRAME_TYPE
Thin frame type.- See Also:
- Constant Field Values
-
DOUBLE_FRAME_TYPE
public static final int DOUBLE_FRAME_TYPE
Double frame type.- See Also:
- Constant Field Values
-
SHAPE_RHOMBUS
public static final java.awt.Shape SHAPE_RHOMBUS
Rhombus base shape.
-
SHAPE_ROUNDED_RECTANGLE
public static final java.awt.Shape SHAPE_ROUNDED_RECTANGLE
Rounded rectangle base shape
-
SHAPE_RECTANGLE
public static final java.awt.Shape SHAPE_RECTANGLE
Rounded rectangle base shape
-
SHAPE_ELLIPSE
public static final java.awt.Shape SHAPE_ELLIPSE
Ellipse base shape
-
NON_HIGHLIGHT_DARKENING_FACTOR
protected static final float NON_HIGHLIGHT_DARKENING_FACTOR
Darkening factor for non-highlighted icons- See Also:
- Constant Field Values
-
BASE_ICON_SIZE
protected static final int BASE_ICON_SIZE
The base icon size.- See Also:
- Constant Field Values
-
ACTIVATION_SHIFT
protected static final int ACTIVATION_SHIFT
The activation shift.- See Also:
- Constant Field Values
-
BUTTON_SIZE
protected static final int BUTTON_SIZE
The button size.- See Also:
- Constant Field Values
-
IMAGE_SYMBOL_INSET_FACTOR
protected static final double IMAGE_SYMBOL_INSET_FACTOR
The image symbol inset factor.- See Also:
- Constant Field Values
-
SHADOW_SCALE
protected static final double SHADOW_SCALE
- See Also:
- Constant Field Values
-
FRAME_THICKNESS
protected static final int FRAME_THICKNESS
The frame thickness.- See Also:
- Constant Field Values
-
THIN_FRAME_THICKNESS
protected static final int THIN_FRAME_THICKNESS
The frame thickness factor for thin frames.- See Also:
- Constant Field Values
-
GLASS_SHRINK
protected static final double GLASS_SHRINK
The glass effect shrink factor.- See Also:
- Constant Field Values
-
GUI_DIR
protected static final java.lang.String GUI_DIR
The gui directory
-
IMAGE_DIR
protected static final java.lang.String IMAGE_DIR
The image directory
-
FONT_DIR
protected static final java.lang.String FONT_DIR
The font directory
-
BLUR_FILTER_X
protected static final java.awt.image.ConvolveOp BLUR_FILTER_X
-
BLUR_FILTER_Y
protected static final java.awt.image.ConvolveOp BLUR_FILTER_Y
-
imagecache
protected java.util.Map<java.lang.Object,java.awt.Image> imagecache
The image cache.
-
iconfont
protected java.awt.Font iconfont
The icon font used.
-
-
Method Detail
-
generateGenericFlatImageIconSet
public 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.- Parameters:
iconsize
- The icon size.frametype
- The button frame type.symbol
- Symbol name or text.symbolcolor
- Color of the symbol.- Returns:
- The generated icons.
-
generateGenericFlatImageIconSet
public 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.- Parameters:
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.- Returns:
- The generated icons.
-
generateGenericButtonIconSet
public 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.- Parameters:
iconsize
- The icon size.baseshape
- The base shape.symbol
- Symbol name or text.bgcolor
- Color of the icon.- Returns:
- The generated icons.
-
generateGenericButtonIconSet
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)
Generates a generic button icon set in the order off, on, highlight.- Parameters:
iconsize
- The icon size.baseshape
- The base shape.frametype
- The type of frame.symbol
- Symbol name or text.bgcolor
- Color of the icon.- Returns:
- The generated icons.
-
generateGenericButtonIcon
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)
Generates a generic button icon.- Parameters:
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.- Returns:
- The generated image icon.
-
generateGenericButtonIcon
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)
Generates a generic button icon.- Parameters:
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.- Returns:
- The generated image icon.
-
generateFlatButtonIcon
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)
Generates a flat version of a button icon.- Parameters:
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.- Returns:
- The generated image icon.
-
-