com.vaadin.ui
Class Image

java.lang.Object
  extended by com.vaadin.server.AbstractClientConnector
      extended by com.vaadin.ui.AbstractComponent
          extended by com.vaadin.ui.AbstractEmbedded
              extended by com.vaadin.ui.Image
All Implemented Interfaces:
ContextClickEvent.ContextClickNotifier, MethodEventSource, ClientConnector, Sizeable, com.vaadin.shared.Connector, Component, java.io.Serializable

public class Image
extends AbstractEmbedded

Component for embedding images.

Since:
7.0
Version:
Author:
Vaadin Ltd.
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
 
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
 
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
Sizeable.Unit
 
Field Summary
protected  com.vaadin.shared.ui.image.ImageServerRpc rpc
           
 
Fields inherited from class com.vaadin.ui.AbstractComponent
DESIGN_ATTR_PLAIN_TEXT
 
Fields inherited from interface com.vaadin.server.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
 
Constructor Summary
Image()
          Creates a new empty Image.
Image(java.lang.String caption)
          Creates a new empty Image with caption.
Image(java.lang.String caption, Resource source)
          Creates a new Image whose contents is loaded from given resource.
 
Method Summary
 void addClickListener(MouseEvents.ClickListener listener)
          Add a click listener to the component.
 void addListener(MouseEvents.ClickListener listener)
          Deprecated. As of 7.0, use #addClickListener(ClickListener) instead
protected  com.vaadin.shared.ui.image.ImageState getState()
          Returns the shared state bean with information to be sent from the server to the client.
 void removeClickListener(MouseEvents.ClickListener listener)
          Remove a click listener from the component.
 void removeListener(MouseEvents.ClickListener listener)
          Deprecated. As of 7.0, use #removeClickListener(ClickListener) instead
 
Methods inherited from class com.vaadin.ui.AbstractEmbedded
getAlternateText, getCustomAttributes, getSource, getState, readDesign, setAlternateText, setSource, writeDesign
 
Methods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getExplicitImmediateValue, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isImmediate, isOrHasAncestor, isReadOnly, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeight, setHeightUndefined, setIcon, setId, setImmediate, setLocale, setParent, setPrimaryStyleName, setReadOnly, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setStyleName, setVisible, setWidth, setWidth, setWidthUndefined
 
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.vaadin.ui.Component
getUI
 
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
 
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
 

Field Detail

rpc

protected com.vaadin.shared.ui.image.ImageServerRpc rpc
Constructor Detail

Image

public Image()
Creates a new empty Image.


Image

public Image(java.lang.String caption)
Creates a new empty Image with caption.

Parameters:
caption -

Image

public Image(java.lang.String caption,
             Resource source)
Creates a new Image whose contents is loaded from given resource. The dimensions are assumed if possible. The type is guessed from resource.

Parameters:
caption -
source - the Source of the embedded object.
Method Detail

getState

protected com.vaadin.shared.ui.image.ImageState getState()
Description copied from class: AbstractComponent
Returns the shared state bean with information to be sent from the server to the client. Subclasses should override this method and set any relevant fields of the state returned by super.getState().

Overrides:
getState in class AbstractEmbedded
Returns:
updated component shared state

addListener

@Deprecated
public void addListener(MouseEvents.ClickListener listener)
Deprecated. As of 7.0, use #addClickListener(ClickListener) instead


addClickListener

public void addClickListener(MouseEvents.ClickListener listener)
Add a click listener to the component. The listener is called whenever the user clicks inside the component. Depending on the content the event may be blocked and in that case no event is fired. Use #removeClickListener(ClickListener) to remove the listener.

Parameters:
listener - The listener to add

removeListener

@Deprecated
public void removeListener(MouseEvents.ClickListener listener)
Deprecated. As of 7.0, use #removeClickListener(ClickListener) instead


removeClickListener

public void removeClickListener(MouseEvents.ClickListener listener)
Remove a click listener from the component. The listener should earlier have been added using #addClickListener(ClickListener).

Parameters:
listener - The listener to remove


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