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 int
Flag indicating that the Icon should automatically draw itself disabled when its enclosing component is disabledstatic final int
Flag indicating that the Icon should automatically produce a rollover version of itself.static final int
Icon effect: make icon 50% transparentstatic final int
Icon effect draw icon darkerstatic final int
Icon effect: convert to gray (desaturate)static final int
Icon effect: convert to gray (desaturate) partially (50%)static final int
Icon effect: draw icon lighterstatic final int
Icon effect: make icon 50% transparentstatic final int
Rotate the icon by 180 degreesstatic final int
Rotate the icon by 270 degreesstatic final int
Rotate the icon by 90 degrees -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the default effects.getEffectIcon
(String name) Get theEffectIcon
for a given name.getEffectIcon
(String name, int effectFlags) Get theEffectIcon
for a given name.getEffectIcon
(String name, int effectFlags, Dimension targetSize) Get theEffectIcon
for a given name and a set of effect flags scaled to a given dimension.com.google.gwt.resources.client.ImageResource
getImageResource
(String name) static IconManager
getInstance
(Object bundle) void
setDefaultEffects
(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 theEffectIcon
for a given name. The Icon will have no SFX.- Parameters:
name
- the icon's name.- Returns:
- the icon or
null
if the icon wasn't found.
-
getEffectIcon
Get theEffectIcon
for 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
null
if the icon wasn't found. - See Also:
-
getEffectIcon
Get theEffectIcon
for 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
null
if 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
-