Package com.jadice.web.util.icon.client
Class IconManager
java.lang.Object
com.jadice.web.util.icon.client.IconManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intFlag indicating that the Icon should automatically draw itself disabled when its enclosing component is disabledstatic final intFlag indicating that the Icon should automatically produce a rollover version of itself.static final intIcon effect: make icon 50% transparentstatic final intIcon effect draw icon darkerstatic final intIcon effect: convert to gray (desaturate)static final intIcon effect: convert to gray (desaturate) partially (50%)static final intIcon effect: draw icon lighterstatic final intIcon effect: make icon 50% transparentstatic final intRotate the icon by 180 degreesstatic final intRotate the icon by 270 degreesstatic final intRotate the icon by 90 degrees -
Method Summary
Modifier and TypeMethodDescriptionintGets the default effects.getEffectIcon(String name) Get theEffectIconfor a given name.getEffectIcon(String name, int effectFlags) Get theEffectIconfor a given name.getEffectIcon(String name, int effectFlags, Dimension targetSize) Get theEffectIconfor a given name and a set of effect flags scaled to a given dimension.com.google.gwt.resources.client.ImageResourcegetImageResource(String name) static IconManagergetInstance(Object bundle) voidsetDefaultEffects(int defaultEffects) Sets the default effects.
-
Field Details
-
AUTO_DISABLE
public static final int AUTO_DISABLEFlag indicating that the Icon should automatically draw itself disabled when its enclosing component is disabled- See Also:
-
AUTO_ROLLOVER
public static final int AUTO_ROLLOVERFlag indicating that the Icon should automatically produce a rollover version of itself.- See Also:
-
EFFECT_GRAY
public static final int EFFECT_GRAYIcon effect: convert to gray (desaturate)- See Also:
-
EFFECT_GRAY50P
public static final int EFFECT_GRAY50PIcon effect: convert to gray (desaturate) partially (50%)- See Also:
-
EFFECT_LIGHTER
public static final int EFFECT_LIGHTERIcon effect: draw icon lighter- See Also:
-
EFFECT_DARKER
public static final int EFFECT_DARKERIcon effect draw icon darker- See Also:
-
EFFECT_ALPHA50P
public static final int EFFECT_ALPHA50PIcon effect: make icon 50% transparent- See Also:
-
EFFECT_MORECONTRAST
public static final int EFFECT_MORECONTRASTIcon effect: make icon 50% transparent- See Also:
-
ROTATE_90
public static final int ROTATE_90Rotate the icon by 90 degrees- See Also:
-
ROTATE_180
public static final int ROTATE_180Rotate the icon by 180 degrees- See Also:
-
ROTATE_270
public static final int ROTATE_270Rotate the icon by 270 degrees- See Also:
-
-
Method Details
-
getInstance
- Parameters:
bundle- a ClientBundle to use. Usually UiStyler.get()- Returns:
- an Instance of the IconManager
-
getEffectIcon
Get theEffectIconfor a given name. The Icon will have no SFX.- Parameters:
name- the icon's name.- Returns:
- the icon or
nullif the icon wasn't found.
-
getEffectIcon
Get theEffectIconfor a given name. The Icon will have the specified effects.- Parameters:
name- the icon's name.effectFlags- an ORed combination of a set of effect flags.- Returns:
- the icon or
nullif the icon wasn't found. - See Also:
-
getEffectIcon
Get theEffectIconfor a given name and a set of effect flags scaled to a given dimension.- Parameters:
name- the icon's name.effectFlags- an ORed combination of a set of effect flags.targetSize- the size of the resulting icon- Returns:
- the icon or
nullif the icon wasn't found. - See Also:
-
getImageResource
-
getDefaultEffects
public int getDefaultEffects()Gets the default effects.- Returns:
- Returns a int
-
setDefaultEffects
public void setDefaultEffects(int defaultEffects) Sets the default effects.- Parameters:
defaultEffects- The defaultEffects to set
-