@FunctionalInterface public interface HasComponent extends com.vaadin.flow.component.HasElement
Component, which can be obtained using the
getComponent() method.| Modifier and Type | Method and Description |
|---|---|
static HasComponent |
create(com.vaadin.flow.component.Component component)
Create a
HasComponent using given component. |
com.vaadin.flow.component.Component |
getComponent()
Get the UI
Component which represents this object. |
default com.vaadin.flow.dom.Element |
getElement() |
default Optional<com.vaadin.flow.component.HasEnabled> |
hasEnabled()
Checks whether the
Component may be enabled or disabled, using the HasEnabled interface. |
default Optional<HasLabel> |
hasLabel()
Checks whether this component supports a label, which text can be handled using the
HasLabel interface. |
default Optional<com.vaadin.flow.component.HasSize> |
hasSize()
Checks whether the
Component supports size setting, using the HasSize interface. |
default Optional<com.vaadin.flow.component.HasStyle> |
hasStyle()
Checks whether the
Component supports css style classes, using the HasStyle interface. |
default Optional<com.vaadin.flow.component.HasValidation> |
hasValidation()
Checks whether the
Component supports input validation, using the HasValidation interface. |
default boolean |
isVisible()
Gets the component visibility value.
|
default void |
setVisible(boolean visible)
Sets the component visibility value.
|
com.vaadin.flow.component.Component getComponent()
Component which represents this object.default com.vaadin.flow.dom.Element getElement()
getElement in interface com.vaadin.flow.component.HasElementdefault void setVisible(boolean visible)
When a component is set as invisible, all the updates of the component from the server to the client are blocked until the component is set as visible again.
Invisible components don't receive any updates from the client-side. Unlike the server-side updates, client-side updates, if any, are discarded while the component is invisible, and are not transmitted to the server when the component is made visible.
visible - the component visibility valuedefault boolean isVisible()
true if the component is visible, false otherwisedefault Optional<com.vaadin.flow.component.HasEnabled> hasEnabled()
Component may be enabled or disabled, using the HasEnabled interface.HasEnabled reference. An empty Optional
otherwise.default Optional<com.vaadin.flow.component.HasStyle> hasStyle()
Component supports css style classes, using the HasStyle interface.HasStyle reference. An empty Optional
otherwise.default Optional<com.vaadin.flow.component.HasSize> hasSize()
Component supports size setting, using the HasSize interface.HasSize reference. An empty Optional
otherwise.default Optional<HasLabel> hasLabel()
HasLabel interface.HasLabel reference. An empty Optional is returned
otherwise.default Optional<com.vaadin.flow.component.HasValidation> hasValidation()
Component supports input validation, using the HasValidation interface.HasValidation reference. An empty Optional
otherwise.static HasComponent create(com.vaadin.flow.component.Component component)
HasComponent using given component.component - The component to provide from the getComponent() method (not null)HasComponent bound to given componentCopyright © 2019 The Holon Platform. All rights reserved.