Class IconManager

java.lang.Object
com.jadice.web.util.icon.client.IconManager

public class IconManager extends Object
  • Field Details

    • AUTO_DISABLE

      public static final int AUTO_DISABLE
      Flag indicating that the Icon should automatically draw itself disabled when its enclosing component is disabled
      See Also:
    • AUTO_ROLLOVER

      public static final int AUTO_ROLLOVER
      Flag indicating that the Icon should automatically produce a rollover version of itself.
      See Also:
    • EFFECT_GRAY

      public static final int EFFECT_GRAY
      Icon effect: convert to gray (desaturate)
      See Also:
    • EFFECT_GRAY50P

      public static final int EFFECT_GRAY50P
      Icon effect: convert to gray (desaturate) partially (50%)
      See Also:
    • EFFECT_LIGHTER

      public static final int EFFECT_LIGHTER
      Icon effect: draw icon lighter
      See Also:
    • EFFECT_DARKER

      public static final int EFFECT_DARKER
      Icon effect draw icon darker
      See Also:
    • EFFECT_ALPHA50P

      public static final int EFFECT_ALPHA50P
      Icon effect: make icon 50% transparent
      See Also:
    • EFFECT_MORECONTRAST

      public static final int EFFECT_MORECONTRAST
      Icon effect: make icon 50% transparent
      See Also:
    • ROTATE_90

      public static final int ROTATE_90
      Rotate the icon by 90 degrees
      See Also:
    • ROTATE_180

      public static final int ROTATE_180
      Rotate the icon by 180 degrees
      See Also:
    • ROTATE_270

      public static final int ROTATE_270
      Rotate the icon by 270 degrees
      See Also:
  • Method Details

    • getInstance

      public static IconManager getInstance(Object bundle)
      Parameters:
      bundle - a ClientBundle to use. Usually UiStyler.get()
      Returns:
      an Instance of the IconManager
    • getEffectIcon

      public EffectIcon getEffectIcon(String name)
      Get the EffectIcon 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

      public EffectIcon getEffectIcon(String name, int effectFlags)
      Get the EffectIcon 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

      public EffectIcon getEffectIcon(String name, int effectFlags, Dimension targetSize)
      Get the EffectIcon 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

      public com.google.gwt.resources.client.ImageResource getImageResource(String name)
    • 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