Package jadex.gpmn.editor.gui
Class ImageProvider
- java.lang.Object
- 
- jadex.gpmn.editor.gui.ImageProvider
 
- 
 public class ImageProvider extends java.lang.ObjectClass for providing images, either stored or generated, with a cache.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected static classImageProvider.ModulateCompositeComposite for modulation.
 - 
Field SummaryFields 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.protected static java.lang.StringFONT_DIRThe font directoryprotected static intFRAME_THICKNESSThe frame thickness.protected java.util.Map<java.lang.String,java.awt.Image>genimagecacheThe generated image cache.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 intSHADOW_SIZEThe shadow size.static 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 shapeprotected java.util.Map<java.lang.String,java.awt.Image>textimagecacheThe rendered text cache.static intTHICK_FRAME_TYPEThick frame type.protected static intTHIN_FRAME_THICKNESSThe frame thickness factor for thin frames.static intTHIN_FRAME_TYPEThin frame type.
 - 
Constructor SummaryConstructors Constructor Description ImageProvider()
 - 
Method SummaryAll 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 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 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 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 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 bgcolor)Generates a generic button icon set in the order off, on, highlight.javax.swing.Icon[]generateGenericFlatImageIconSet(int iconsize, java.lang.String symbol)Generates a generic flat image icon set in the order off, on, highlight.
 
- 
- 
- 
Field Detail- 
THICK_FRAME_TYPEpublic static final int THICK_FRAME_TYPE Thick frame type.- See Also:
- Constant Field Values
 
 - 
THIN_FRAME_TYPEpublic static final int THIN_FRAME_TYPE Thin frame type.- See Also:
- Constant Field Values
 
 - 
DOUBLE_FRAME_TYPEpublic static final int DOUBLE_FRAME_TYPE Double frame type.- See Also:
- Constant Field Values
 
 - 
SHAPE_RHOMBUSpublic static final java.awt.Shape SHAPE_RHOMBUS Rhombus base shape.
 - 
SHAPE_ROUNDED_RECTANGLEpublic static final java.awt.Shape SHAPE_ROUNDED_RECTANGLE Rounded rectangle base shape
 - 
SHAPE_RECTANGLEpublic static final java.awt.Shape SHAPE_RECTANGLE Rounded rectangle base shape
 - 
SHAPE_ELLIPSEpublic static final java.awt.Shape SHAPE_ELLIPSE Ellipse base shape
 - 
NON_HIGHLIGHT_DARKENING_FACTORprotected static final float NON_HIGHLIGHT_DARKENING_FACTOR Darkening factor for non-highlighted icons- See Also:
- Constant Field Values
 
 - 
BASE_ICON_SIZEprotected static final int BASE_ICON_SIZE The base icon size.- See Also:
- Constant Field Values
 
 - 
ACTIVATION_SHIFTprotected static final int ACTIVATION_SHIFT The activation shift.- See Also:
- Constant Field Values
 
 - 
BUTTON_SIZEprotected static final int BUTTON_SIZE The button size.- See Also:
- Constant Field Values
 
 - 
IMAGE_SYMBOL_INSET_FACTORprotected static final double IMAGE_SYMBOL_INSET_FACTOR The image symbol inset factor.- See Also:
- Constant Field Values
 
 - 
SHADOW_SIZEprotected static final int SHADOW_SIZE The shadow size.- See Also:
- Constant Field Values
 
 - 
FRAME_THICKNESSprotected static final int FRAME_THICKNESS The frame thickness.- See Also:
- Constant Field Values
 
 - 
THIN_FRAME_THICKNESSprotected static final int THIN_FRAME_THICKNESS The frame thickness factor for thin frames.- See Also:
- Constant Field Values
 
 - 
GLASS_SHRINKprotected static final double GLASS_SHRINK The glass effect shrink factor.- See Also:
- Constant Field Values
 
 - 
GUI_DIRprotected static final java.lang.String GUI_DIR The gui directory
 - 
IMAGE_DIRprotected static final java.lang.String IMAGE_DIR The image directory
 - 
FONT_DIRprotected static final java.lang.String FONT_DIR The font directory
 - 
BLUR_FILTER_Xprotected static final java.awt.image.ConvolveOp BLUR_FILTER_X 
 - 
BLUR_FILTER_Yprotected static final java.awt.image.ConvolveOp BLUR_FILTER_Y 
 - 
imagecacheprotected java.util.Map<java.lang.Object,java.awt.Image> imagecache The image cache.
 - 
genimagecacheprotected java.util.Map<java.lang.String,java.awt.Image> genimagecache The generated image cache.
 - 
textimagecacheprotected java.util.Map<java.lang.String,java.awt.Image> textimagecache The rendered text cache.
 - 
iconfontprotected java.awt.Font iconfont The icon font used.
 
- 
 - 
Method Detail- 
generateGenericFlatImageIconSetpublic javax.swing.Icon[] generateGenericFlatImageIconSet(int iconsize, java.lang.String symbol)Generates a generic flat image icon set in the order off, on, highlight.- Parameters:
- iconsize- The icon size.
- symbol- Symbol name or text.
- bgcolor- Color of the icon
- Returns:
- The generated icons.
 
 - 
generateGenericButtonIconSetpublic javax.swing.Icon[] generateGenericButtonIconSet(int iconsize, java.awt.Shape baseshape, java.lang.String symbol, 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.
 
 - 
generateGenericButtonIconSetpublic javax.swing.Icon[] generateGenericButtonIconSet(int iconsize, java.awt.Shape baseshape, int frametype, java.lang.String symbol, 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.
 
 - 
generateGenericButtonIconpublic javax.swing.ImageIcon generateGenericButtonIcon(int iconsize, java.awt.Shape baseshape, java.lang.String symbol, 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.
 
 - 
generateGenericButtonIconpublic javax.swing.ImageIcon generateGenericButtonIcon(int iconsize, java.awt.Shape baseshape, int frametype, java.lang.String symbol, 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 icon
- high- Highlight the icon if true.
- shift- Shift (for pressed status) if true.
- Returns:
- The generated image icon.
 
 - 
generateFlatButtonIconpublic javax.swing.ImageIcon generateFlatButtonIcon(int iconsize, java.awt.Shape baseshape, int frametype, java.lang.String symbol, 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 icon
- high- Highlight the icon if true.
- shift- Shift (for pressed status) if true.
- Returns:
- The generated image icon.
 
 
- 
 
-