asquare.gwt.tk.client.ui
Class Icon
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Image
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.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 |
Icon
public Icon(String url,
int width,
int height)
- Creates a new Icon sized in pixels.
- Parameters:
url - the url of the imagewidth - the width in pixelsheight - 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 imagewidth - the width in CSS measurementsheight - the height in CSS measurements
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
© 2007 Mat Gessel