GWT Tk 0.2.3

asquare.gwt.tk.client.ui
Class Icon

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Image
              extended by asquare.gwt.tk.client.ui.Icon
All Implemented Interfaces:
EventListener, SourcesClickEvents, SourcesLoadEvents, SourcesMouseEvents

public class Icon
extends Image

An icon is an image which requires its dimensions be specifed at construction time. Useful for static layouts.


Constructor Summary
Icon(String url, int width, int height)
          Creates a new Icon sized in pixels.
Icon(String url, String width, String height)
          Creates a new Icon sized in CSS measurements.
 
Method Summary
 int getHeight()
          Gets the CSS height of the underlying element.
 int getWidth()
          Gets the CSS width of the underlying element.
 
Methods inherited from class com.google.gwt.user.client.ui.Image
addClickListener, addLoadListener, addMouseListener, getUrl, onBrowserEvent, prefetch, removeClickListener, removeLoadListener, removeMouseListener, setUrl
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached, onAttach, onDetach, onLoad, removeFromParent
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getTitle, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Icon

public Icon(String url,
            int width,
            int height)
Creates a new Icon sized in pixels.

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

Icon

public Icon(String url,
            String width,
            String height)
Creates a new Icon sized in CSS measurements.

Parameters:
url - the url of the image
width - the width in CSS measurements
height - the height in CSS measurements
Method Detail

getWidth

public int getWidth()
Gets the CSS width of the underlying element.

Returns:
the width in CSS measurements

getHeight

public int getHeight()
Gets the CSS height of the underlying element.

Returns:
the height in CSS measurements

GWT Tk 0.2.3

© 2007 Mat Gessel