public class ButtonRenderer<T> extends ClickableRenderer<T,String>
ClickableRenderer.RendererClickEvent<T>, ClickableRenderer.RendererClickListener<T>
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
Constructor and Description |
---|
ButtonRenderer()
Creates a new button renderer.
|
ButtonRenderer(ClickableRenderer.RendererClickListener<T> listener)
Creates a new button renderer and adds the given click listener to it.
|
ButtonRenderer(ClickableRenderer.RendererClickListener<T> listener,
String nullRepresentation)
Creates a new button renderer and adds the given click listener to it.
|
ButtonRenderer(String nullRepresentation)
Creates a new button renderer.
|
Modifier and Type | Method and Description |
---|---|
String |
getNullRepresentation()
Null representation for the renderer.
|
protected ButtonRendererState |
getState()
Returns the shared state for this connector.
|
protected ButtonRendererState |
getState(boolean markAsDirty)
Returns the shared state for this connector.
|
boolean |
isHtmlContentAllowed()
Gets whether the data should be rendered as HTML (instead of text).
|
void |
setHtmlContentAllowed(boolean htmlContentAllowed)
Sets whether the data should be rendered as HTML (instead of text).
|
addClickListener, removeClickListener
encode, encode, extend, getParent, getParentGrid, getPresentationType, getSupportedParentType
remove, setParent
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, attach, beforeClientResponse, createState, detach, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isConnectorEnabled, 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
addAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
getConnectorId
public ButtonRenderer(String nullRepresentation)
nullRepresentation
- the textual representation of null
valuepublic ButtonRenderer(ClickableRenderer.RendererClickListener<T> listener, String nullRepresentation)
listener
- the click listener to registernullRepresentation
- the textual representation of null
valuepublic ButtonRenderer()
public ButtonRenderer(ClickableRenderer.RendererClickListener<T> listener)
listener
- the click listener to registerpublic String getNullRepresentation()
AbstractRenderer
getNullRepresentation
in class AbstractRenderer<T,String>
null
protected ButtonRendererState getState()
AbstractClientConnector
As a side effect, marks the connector dirty so any changes done to the
state will be sent to the client. Use getState(false)
to avoid
marking the connector as dirty.
getState
in class ClickableRenderer<T,String>
protected ButtonRendererState getState(boolean markAsDirty)
AbstractClientConnector
getState
in class ClickableRenderer<T,String>
markAsDirty
- true if the connector should automatically be marked dirty,
false otherwiseAbstractClientConnector.getState()
public void setHtmlContentAllowed(boolean htmlContentAllowed)
By default everything is rendered as text.
htmlContentAllowed
- true
to render as HTML, false
to
render as textpublic boolean isHtmlContentAllowed()
By default everything is rendered as text.
true
if the renderer renders a HTML,
false
if the content is rendered as textCopyright © 2018 Vaadin Ltd. All rights reserved.