Package jadex.bpmn.editor.gui
Class ImageProvider
- java.lang.Object
-
- jadex.bpmn.editor.gui.ImageProvider
-
public class ImageProvider extends java.lang.ObjectClass for providing images, either stored or generated, with a cache.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classImageProvider.ModulateCompositeComposite for modulation.
-
Field Summary
Fields Modifier and Type Field Description protected static intACTIVATION_SHIFTThe activation shift.protected static intBASE_ICON_SIZEThe base icon size.protected static java.awt.image.ConvolveOpBLUR_FILTER_Xprotected static java.awt.image.ConvolveOpBLUR_FILTER_Yprotected static intBUTTON_SIZEThe button size.static intDOUBLE_FRAME_TYPEDouble frame type.static intEMPTY_FRAME_TYPEThick frame type.protected static java.lang.StringFONT_DIRThe font directoryprotected static intFRAME_THICKNESSThe frame thickness.protected static doubleGLASS_SHRINKThe glass effect shrink factor.protected static java.lang.StringGUI_DIRThe gui directoryprotected java.awt.FonticonfontThe icon font used.protected static java.lang.StringIMAGE_DIRThe image directoryprotected static doubleIMAGE_SYMBOL_INSET_FACTORThe image symbol inset factor.protected java.util.Map<java.lang.Object,java.awt.Image>imagecacheThe image cache.protected static floatNON_HIGHLIGHT_DARKENING_FACTORDarkening factor for non-highlighted iconsprotected static doubleSHADOW_SCALEstatic java.awt.ShapeSHAPE_ELLIPSEEllipse base shapestatic java.awt.ShapeSHAPE_RECTANGLERounded rectangle base shapestatic java.awt.ShapeSHAPE_RHOMBUSRhombus base shape.static java.awt.ShapeSHAPE_ROUNDED_RECTANGLERounded rectangle base shapestatic intTHICK_FRAME_TYPEThick frame type.protected static intTHIN_FRAME_THICKNESSThe frame thickness factor for thin frames.static intTHIN_FRAME_TYPEThin frame type.
-
Constructor Summary
Constructors Constructor Description ImageProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.swing.ImageIcongenerateFlatButtonIcon(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.ImageIcongenerateGenericButtonIcon(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.ImageIcongenerateGenericButtonIcon(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.
-
-