B
- Concrete configurator typepublic interface ComponentConfigurator<B extends ComponentConfigurator<B>>
Component
.Modifier and Type | Interface and Description |
---|---|
static interface |
ComponentConfigurator.BaseComponentConfigurator
Base component configurator.
|
Modifier and Type | Method and Description |
---|---|
B |
caption(com.holonplatform.core.i18n.Localizable caption)
Sets the caption of the component using a
Localizable message. |
default B |
caption(String caption)
Sets the caption of the component.
|
default B |
caption(String defaultCaption,
String messageCode,
Object... arguments)
Sets the caption of the component using a localizable
messageCode . |
B |
captionAsHtml()
Sets the caption rendered as HTML.
|
B |
description(com.holonplatform.core.i18n.Localizable description)
Sets the component's description using a
Localizable message. |
default B |
description(String description)
Sets the component's description.
|
default B |
description(String defaultDescription,
String messageCode,
Object... arguments)
Sets the component's description using a localizable
messageCode . |
B |
disabled()
Disables the component.
|
B |
errorHandler(com.vaadin.server.ErrorHandler errorHandler)
Sets the error handler for the component.
|
B |
fullHeight()
Set the component heigth to 100%
|
B |
fullSize()
Set the component width and heigth to 100%
|
B |
fullWidth()
Set the component width to 100%
|
B |
height(float height,
com.vaadin.server.Sizeable.Unit unit)
Sets the height of the object.
|
B |
height(String height)
Sets the height of the component using String presentation.
|
B |
heightUndefined()
Clears any defined height
|
B |
hidden()
Set the component as not visible.
|
B |
icon(com.vaadin.server.Resource icon)
Sets the icon of the component.
|
B |
id(String id)
Adds an unique id for component that is used in the client-side for testing purposes.
|
B |
notVisible()
Sets the components as not visible.
|
B |
primaryStyleName(String style)
Changes the primary style name of the component.
|
B |
replaceStyleName(String styleName)
Sets one or more user-defined style names of the component, replacing any previous user-defined styles.
|
B |
responsive()
Enables responsiveness for this component
|
B |
sizeUndefined()
Clears any size settings
|
B |
styleName(String styleName)
Adds one or more style names to this component.
|
B |
width(float width,
com.vaadin.server.Sizeable.Unit unit)
Sets the width of the object.
|
B |
width(String width)
Sets the width of the component using String presentation.
|
B |
widthUndefined()
Clears any defined width
|
B |
withAttachListener(com.vaadin.server.ClientConnector.AttachListener listener)
Add an
ClientConnector.AttachListener to the component, called after the component is attached to the application. |
B |
withContextClickListener(com.vaadin.event.ContextClickEvent.ContextClickListener listener)
Add a
ContextClickEvent.ContextClickListener to this component, that gets notified when a context click happens. |
B |
withData(Object data)
Sets the data object, that can be used for any application specific data.
|
B |
withDetachListener(com.vaadin.server.ClientConnector.DetachListener listener)
Add an
ClientConnector.DetachListener to the component, called before the component is detached from the application. |
B |
withShortcutListener(com.vaadin.event.ShortcutListener shortcut)
Add a
ShortcutListener to this component |
B width(float width, com.vaadin.server.Sizeable.Unit unit)
width
- The width of the componentunit
- The unit used for the widthB width(String width)
String presentation is similar to what is used in Cascading Style Sheets. Size can be length or percentage of available size.
The empty string ("") or null will unset the width and set the units to pixels.
width
- Width in CSS style string representation.B height(float height, com.vaadin.server.Sizeable.Unit unit)
height
- The height of the componentunit
- The unit used for the heightB height(String height)
String presentation is similar to what is used in Cascading Style Sheets. Size can be length or percentage of available size.
The empty string ("") or null will unset the height and set the units to pixels.
height
- Height in CSS style string representation.B fullWidth()
B fullHeight()
B fullSize()
B widthUndefined()
B heightUndefined()
B sizeUndefined()
B styleName(String styleName)
Each style name will occur in two versions: one as specified and one that is prefixed with the style name of the component.
styleName
- The new style to be added to the componentB replaceStyleName(String styleName)
Each style name will occur in two versions: one as specified and one that is prefixed with the style name of the component.
styleName
- The new style or styles of the component as a space-separated listB primaryStyleName(String style)
The primary style name identifies the component when applying the CSS theme to the Component. By changing the style name all CSS rules targeted for that style name will no longer apply, and might result in the component not working as intended.
style
- The new primary style nameB disabled()
B notVisible()
B hidden()
Invisible components are not drawn in the user interface. The effect is not merely a cosmetic CSS change - no information about an invisible component will be sent to the client. The effect is thus the same as removing the component from its parent.
B captionAsHtml()
When the captions are rendered in the browser as HTML, the developer is responsible for ensuring no harmful HTML is used.
default B caption(String caption)
A caption is an explanatory textual label accompanying a user interface component, usually shown above, left of, or inside the component.
caption
- The new caption for the component. If the caption is null
, no caption is showndefault B caption(String defaultCaption, String messageCode, Object... arguments)
messageCode
.
For caption localization, a LocalizationContext
must be available and localized as Context
resource when component is built.
defaultCaption
- Default caption if no translation is available for given messageCode
for
current Locale, or no LocalizationContext
is available at allmessageCode
- Caption translation message keyarguments
- Optional translation argumentsB caption(com.holonplatform.core.i18n.Localizable caption)
Localizable
message.
For caption localization, a LocalizationContext
must be available and localized as Context
resource when component is built.
caption
- Caption Localizable
messagedefault B description(String description)
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 description to setdefault B description(String defaultDescription, String messageCode, Object... arguments)
messageCode
.
For description localization, a LocalizationContext
must be available and localized as Context
resource when component is built.
defaultDescription
- Default description if no translation is available for given messageCode
for current Locale, or no LocalizationContext
is available at allmessageCode
- Description translation message keyarguments
- Optional translation argumentsB description(com.holonplatform.core.i18n.Localizable description)
Localizable
message.
For description localization, a LocalizationContext
must be available and localized as Context
resource when component is built.
description
- Description Localizable
messageB icon(com.vaadin.server.Resource icon)
An icon is an explanatory graphical label accompanying a user interface component, usually shown above, left of, or inside the component. Icon is closely related to caption and is usually displayed horizontally before or after it, depending on the component and the containing layout.
icon
- The icon of the component. If null
, no icon is shown.B id(String id)
id
- An alphanumeric idB errorHandler(com.vaadin.server.ErrorHandler errorHandler)
The error handler is dispatched whenever there is an error processing the data coming from the client for this component.
errorHandler
- The error handler for this componentB withData(Object data)
data
- The Application specific data.B responsive()
B withAttachListener(com.vaadin.server.ClientConnector.AttachListener listener)
ClientConnector.AttachListener
to the component, called after the component is attached to the application.listener
- Listener to addB withDetachListener(com.vaadin.server.ClientConnector.DetachListener listener)
ClientConnector.DetachListener
to the component, called before the component is detached from the application.listener
- Listener to addB withShortcutListener(com.vaadin.event.ShortcutListener shortcut)
ShortcutListener
to this componentshortcut
- ShortcutListener to addB withContextClickListener(com.vaadin.event.ContextClickEvent.ContextClickListener listener)
ContextClickEvent.ContextClickListener
to this component, that gets notified when a context click happens.listener
- ContextClickListener to addCopyright © 2018 The Holon Platform. All rights reserved.