com.vaadin.client.ui
Class ImageIcon

java.lang.Object
  extended by UIObject
      extended by com.vaadin.client.ui.Icon
          extended by com.vaadin.client.ui.ImageIcon

public class ImageIcon
extends Icon

A image based implementation of Icon.

The image is loaded from the given URL ( setUri(String)) and displayed in full.

Author:
Vaadin Ltd

Field Summary
static java.lang.String CLASSNAME
           
 
Constructor Summary
ImageIcon()
           
 
Method Summary
 java.lang.String getUri()
          Gets the current URI for this icon.
 void setAlternateText(java.lang.String alternateText)
          Sets the alternate text for the icon.
 void setUri(java.lang.String imageUrl)
          Sets the URI for the icon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASSNAME

public static final java.lang.String CLASSNAME
See Also:
Constant Field Values
Constructor Detail

ImageIcon

public ImageIcon()
Method Detail

setUri

public void setUri(java.lang.String imageUrl)
Description copied from class: Icon
Sets the URI for the icon. The URI should be run trough ApplicationConnection.translateVaadinUri(String) before setting.

This might be a URL referencing a image (e.g ImageIcon) or a custom URI (e.g FontIcon).

Specified by:
setUri in class Icon
Parameters:
imageUrl - the URI for this icon

setAlternateText

public void setAlternateText(java.lang.String alternateText)
Description copied from class: Icon
Sets the alternate text for the icon.

Specified by:
setAlternateText in class Icon
Parameters:
alternateText - with the alternate text.

getUri

public java.lang.String getUri()
Description copied from class: Icon
Gets the current URI for this icon.

Specified by:
getUri in class Icon
Returns:
URI in use


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.