THIS
- Self-referential generic THISpublic interface FluentAbstractComponent<THIS extends FluentAbstractComponent<THIS>> extends FluentComponent<THIS>, FluentClientConnector<THIS>, FluentContextClickNotifier<THIS>
AbstractComponent
AbstractComponent
FluentComponent.FluentFocusable<C extends FluentComponent.FluentFocusable<C>>
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
Modifier and Type | Method and Description |
---|---|
default THIS |
withCaption(String caption,
boolean captionAsHtml) |
default THIS |
withCaptionAsHtml(boolean captionAsHtml)
Sets whether the caption is rendered as HTML.
|
default THIS |
withComponentError(com.vaadin.server.ErrorMessage componentError)
Sets the component'THIS error message.
|
default THIS |
withData(Object data)
Sets the data object, that can be used for any application specific data.
|
default THIS |
withDescription(String description)
Sets the component'THIS description.
|
default THIS |
withDescription(String description,
com.vaadin.shared.ui.ContentMode mode)
Sets the component's description using given content
mode . |
default THIS |
withLocale(Locale locale)
Sets the locale of this component.
|
default THIS |
withResponsive(boolean responsive)
Toggles responsiveness of this component.
|
default THIS |
withShortcutListener(com.vaadin.event.ShortcutListener shortcut)
Registers a new shortcut listener for the component.
|
default THIS |
withStyleName(String style,
boolean add)
Adds or removes a style name.
|
withCaption, withEnabled, withIcon, withId, withParent, withPrimaryStyleName, withStyleName, withStyleName, withVisible
addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, readDesign, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setVisible, writeDesign
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
withFullHeight, withFullSize, withFullWidth, withHeight, withHeight, withSize, withUndefinedHeight, withUndefinedSize, withUndefinedWidth, withWidth, withWidth
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined
withAttachListener, withDetachListener
withContextClickListener
default THIS withCaptionAsHtml(boolean captionAsHtml)
If set to true, the captions are rendered in the browser as HTML and the developer is responsible for ensuring no harmful HTML is used. If set to false, the caption is rendered in the browser as plain text.
The default is false, i.e. to render that caption as plain text.
captionAsHtml
- true if the captions are rendered as HTML, false if rendered
as plain textAbstractComponent.setCaptionAsHtml(boolean)
default THIS withLocale(Locale locale)
// Component for which the locale is meaningful InlineDateField date = new InlineDateField("Datum"); // German language specified with ISO 639-1 language // code and ISO 3166-1 alpha-2 country code. date.setLocale(new Locale("de", "DE")); date.setResolution(DateField.RESOLUTION_DAY); layout.addComponent(date);
locale
- the locale to become this component'THIS locale.AbstractComponent.setLocale(java.util.Locale)
default THIS withDescription(String description)
Component.getDescription()
for more
information on what the description is.
The description is displayed as HTML in tooltips or directly in certain
components so care should be taken to avoid creating the possibility for
HTML injection and possibly XSS vulnerabilities.description
- the new description string for the component.AbstractComponent.setDescription(java.lang.String)
default THIS withDescription(String description, com.vaadin.shared.ui.ContentMode mode)
mode
. See
Component.getDescription()
for more information on what the description
is.
If the content mode
is ContentMode.HTML the
description is displayed as HTML in tooltips or directly in certain
components so care should be taken to avoid creating the possibility for
HTML injection and possibly XSS vulnerabilities.
description
- the new description string for the component.mode
- the content mode for the descriptionAbstractComponent.setDescription(String, ContentMode)
default THIS withComponentError(com.vaadin.server.ErrorMessage componentError)
componentError
- the new ErrorMessage
of the component.AbstractComponent.setComponentError(com.vaadin.server.ErrorMessage)
default THIS withData(Object data)
data
- the Application specific data.AbstractComponent.setData(java.lang.Object)
default THIS withShortcutListener(com.vaadin.event.ShortcutListener shortcut)
shortcut
- the new Listener to be registered.AbstractComponent.addShortcutListener(com.vaadin.event.ShortcutListener)
default THIS withResponsive(boolean responsive)
responsive
- boolean enables responsiveness, false disablesAbstractComponent.setResponsive(boolean)
default THIS withStyleName(String style, boolean add)
add
parameter is true, the style name is added to the
component. If the add
parameter is false, the style name is
removed from the component.
Functionally this is equivalent to using Component.addStyleName(String)
or
Component.removeStyleName(String)
style
- the style name to be added or removedadd
- true
to add the given style, false
to remove itComponent.addStyleName(String)
,
Component.removeStyleName(String)
Copyright © 2017 Jean-Christophe Fortier. All rights reserved.