public class Image extends AbstractEmbedded
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
Sizeable.Unit
Modifier and Type | Field and Description |
---|---|
protected ImageServerRpc |
rpc |
DESIGN_ATTR_PLAIN_TEXT
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
Constructor and Description |
---|
Image()
Creates a new empty Image.
|
Image(String caption)
Creates a new empty Image with caption.
|
Image(String caption,
Resource source)
Creates a new Image whose contents is loaded from given resource.
|
Modifier and Type | Method and Description |
---|---|
Registration |
addClickListener(MouseEvents.ClickListener listener)
Add a click listener to the component.
|
protected ImageState |
getState()
Returns the shared state bean with information to be sent from the server
to the client.
|
protected ImageState |
getState(boolean markAsDirty)
Returns the shared state for this connector.
|
void |
removeClickListener(MouseEvents.ClickListener listener)
Deprecated.
As of 8.0, replaced by
Registration.remove() in the
registration object returned from
#addClickListener(ClickListener) . |
getAlternateText, getCustomAttributes, getSource, readDesign, setAlternateText, setSource, writeDesign
addContextClickListener, addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isReadOnly, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeight, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setReadOnly, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthUndefined
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, updateDiffstate
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addStyleNames, getUI, removeStyleNames, setStyleName
addAttachListener, addDetachListener, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
getConnectorId
protected ImageServerRpc rpc
public Image()
public Image(String caption)
caption
- protected ImageState getState()
AbstractComponent
getState
in class AbstractEmbedded
protected ImageState getState(boolean markAsDirty)
AbstractClientConnector
getState
in class AbstractEmbedded
markAsDirty
- true if the connector should automatically be marked dirty,
false otherwiseAbstractClientConnector.getState()
public Registration addClickListener(MouseEvents.ClickListener listener)
listener
- The listener to add, not nullRegistration
@Deprecated public void removeClickListener(MouseEvents.ClickListener listener)
Registration.remove()
in the
registration object returned from
#addClickListener(ClickListener)
.#addClickListener(ClickListener)
.listener
- The listener to removeCopyright © 2018 Vaadin Ltd. All rights reserved.