com.extjs.gxt.ui.client.util
Class IconHelper

java.lang.Object
  extended by com.extjs.gxt.ui.client.util.IconHelper

public class IconHelper
extends java.lang.Object

Provides helper methods to create AbstractImagePrototype instances from paths and CSS style names.


Constructor Summary
IconHelper()
           
 
Method Summary
static com.google.gwt.user.client.ui.AbstractImagePrototype create(java.lang.String s)
          Returns an 16 x 16 image.
static com.google.gwt.user.client.ui.AbstractImagePrototype create(java.lang.String s, int width, int height)
          Returns an image.If the passed parameter is an image path, as defined by @link Util.isImagePath(String), it is treated as an image path.
static com.google.gwt.user.client.ui.AbstractImagePrototype createPath(java.lang.String url)
          Returns an 16 x 16 image prototype for the given url.
static com.google.gwt.user.client.ui.AbstractImagePrototype createPath(java.lang.String url, int width, int height)
          Returns an image for the given url.
static com.google.gwt.user.client.ui.AbstractImagePrototype createStyle(java.lang.String styleName)
          Returns a 16 x 16 from the given CSS style name.
static com.google.gwt.user.client.ui.AbstractImagePrototype createStyle(java.lang.String styleName, int width, int height)
          Returns an image from the given CSS style name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IconHelper

public IconHelper()
Method Detail

createPath

public static com.google.gwt.user.client.ui.AbstractImagePrototype createPath(java.lang.String url)
Returns an 16 x 16 image prototype for the given url.

Parameters:
url - the image url
Returns:
the image

createPath

public static com.google.gwt.user.client.ui.AbstractImagePrototype createPath(java.lang.String url,
                                                                              int width,
                                                                              int height)
Returns an image for the given url.

Parameters:
url - the image url
width - the image width in pixels
height - the image height in pixels
Returns:
the image

createStyle

public static com.google.gwt.user.client.ui.AbstractImagePrototype createStyle(java.lang.String styleName)
Returns a 16 x 16 from the given CSS style name.

Parameters:
styleName - the style name
Returns:
the image

createStyle

public static com.google.gwt.user.client.ui.AbstractImagePrototype createStyle(java.lang.String styleName,
                                                                               int width,
                                                                               int height)
Returns an image from the given CSS style name.

Parameters:
styleName - the style name
width - the image width
height - the image height
Returns:
the image

create

public static com.google.gwt.user.client.ui.AbstractImagePrototype create(java.lang.String s)
Returns an 16 x 16 image. If the passed parameter is an image path, as defined by @link Util.isImagePath(String), it is treated as an image path. Otherwise, the parameter is treated as a CSS style name.

Parameters:
s - either a image path or a CSS style name
Returns:
the image

create

public static com.google.gwt.user.client.ui.AbstractImagePrototype create(java.lang.String s,
                                                                          int width,
                                                                          int height)
Returns an image.If the passed parameter is an image path, as defined by @link Util.isImagePath(String), it is treated as an image path. Otherwise, the parameter is treated as a CSS style name.

Parameters:
s - either a image path or a CSS style name
width - the image width
height - the image height
Returns:
the image