HasValue.ValueChangeEvent<V>
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.OptionsStyleProvider, Component.Wrapper
Modifier and Type | Field and Description |
---|---|
protected AbstractCondition |
condition |
static java.util.regex.Pattern |
LIKE_PATTERN |
protected Param |
param |
protected Component |
parent |
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE, UNITS_PERCENTAGE, UNITS_PIXELS
Constructor and Description |
---|
ParamWrapper(AbstractCondition condition,
Param param) |
Modifier and Type | Method and Description |
---|---|
void |
addStyleName(java.lang.String styleName)
Adds one or more style names to this component.
|
Subscription |
addValueChangeListener(java.util.function.Consumer<HasValue.ValueChangeEvent<java.lang.Object>> listener) |
protected void |
fireValueChange(Param.ParamValueChangedEvent event) |
Component.Alignment |
getAlignment() |
protected EventHub |
getEventHub() |
float |
getHeight()
Get component height in
Component.getHeightSizeUnit() |
SizeUnit |
getHeightSizeUnit()
Gets the height property units.
|
java.lang.String |
getId()
Component ID as defined in
id attribute |
Component |
getParent() |
java.lang.String |
getStyleName()
Styles implementation is client-type-specific.
|
java.lang.Object |
getValue() |
float |
getWidth()
Get component width in
Component.getWidthUnits() |
SizeUnit |
getWidthSizeUnit()
Gets the width property units.
|
boolean |
isEnabled()
Is the component enabled?
Note that this method only returns the status of the component and does not take parents into account. |
boolean |
isEnabledRecursive() |
boolean |
isResponsive()
Is the component responsive?
|
boolean |
isVisible()
Is the component visible?
A component is visible only if all its parents are also visible. |
boolean |
isVisibleRecursive() |
void |
removeStyleName(java.lang.String styleName)
Removes one or more style names from component.
|
void |
removeValueChangeListener(java.util.function.Consumer<HasValue.ValueChangeEvent<java.lang.Object>> listener) |
void |
setAlignment(Component.Alignment alignment) |
void |
setEnabled(boolean enabled)
Sets the component enabled state.
|
void |
setHeight(java.lang.String height)
Set component height in
Component.getHeightUnits() |
void |
setId(java.lang.String id)
Set component ID
|
void |
setParent(Component parent)
INTERNAL.
ComponentContainer.add(Component) is normally used for adding components
to a parent and the used method will call this method implicitly. |
void |
setResponsive(boolean responsive)
Sets component to be responsive by width and height.
|
void |
setStyleName(java.lang.String name)
Sets one or more style names of the component, replacing any
previous styles.
|
void |
setValue(java.lang.Object value) |
void |
setVisible(boolean visible)
Sets visibility value for the component.
|
void |
setWidth(java.lang.String width)
Set component width in
Component.getWidthSizeUnit() } |
<X> X |
unwrap(java.lang.Class<X> internalComponentClass)
Get client specific component instance.
|
<X> X |
unwrapComposition(java.lang.Class<X> internalCompositionClass)
Get the outmost external container of client specific component instance.
|
<X> X |
unwrapCompositionOrNull(java.lang.Class<X> internalCompositionClass)
Get the outmost external container of client specific component instance.
|
<X> X |
unwrapOrNull(java.lang.Class<X> internalComponentClass)
Get client specific component instance.
|
<X> void |
withUnwrapped(java.lang.Class<X> internalComponentClass,
java.util.function.Consumer<X> action)
Performs the given
action with underlying component if it can be casted to the given
internalComponentClass . |
<X> void |
withUnwrappedComposition(java.lang.Class<X> internalCompositionClass,
java.util.function.Consumer<X> action)
Get the outmost external container of client specific component instance and performs the given
action . |
protected java.lang.String |
wrapValueForLike(java.lang.Object value) |
protected java.lang.String |
wrapValueForLike(java.lang.Object value,
boolean before,
boolean after) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, getEmptyValue, isEmpty
getHeightUnits, getWidthUnits, isEnabledItself, isVisibleItself, requestFocus, setHeightAuto, setHeightFull, setSizeAuto, setSizeFull, setWidthAuto, setWidthFull
public static final java.util.regex.Pattern LIKE_PATTERN
protected final AbstractCondition condition
protected final Param param
protected Component parent
public ParamWrapper(AbstractCondition condition, Param param)
protected EventHub getEventHub()
public java.lang.Object getValue()
protected java.lang.String wrapValueForLike(java.lang.Object value)
protected java.lang.String wrapValueForLike(java.lang.Object value, boolean before, boolean after)
public void setValue(java.lang.Object value)
public Subscription addValueChangeListener(java.util.function.Consumer<HasValue.ValueChangeEvent<java.lang.Object>> listener)
addValueChangeListener
in interface HasValue<java.lang.Object>
public void removeValueChangeListener(java.util.function.Consumer<HasValue.ValueChangeEvent<java.lang.Object>> listener)
removeValueChangeListener
in interface HasValue<java.lang.Object>
listener
- a listener to removeprotected void fireValueChange(Param.ParamValueChangedEvent event)
public java.lang.String getId()
Component
id
attributepublic void setId(java.lang.String id)
Component
public Component getParent()
public void setParent(Component parent)
Component
ComponentContainer.add(Component)
is normally used for adding components
to a parent and the used method will call this method implicitly.public boolean isEnabled()
Component
public void setEnabled(boolean enabled)
Component
setEnabled
in interface Component
enabled
- enabled flagpublic boolean isResponsive()
Component
isResponsive
in interface Component
public void setResponsive(boolean responsive)
Component
setResponsive
in interface Component
responsive
- responsive flagpublic boolean isVisible()
Component
public void setVisible(boolean visible)
Component
setVisible
in interface Component
visible
- visible flagpublic boolean isVisibleRecursive()
isVisibleRecursive
in interface Component
public boolean isEnabledRecursive()
isEnabledRecursive
in interface Component
public float getHeight()
Component
Component.getHeightSizeUnit()
public SizeUnit getHeightSizeUnit()
Component
getHeightSizeUnit
in interface Component
public void setHeight(java.lang.String height)
Component
Component.getHeightUnits()
public float getWidth()
Component
Component.getWidthUnits()
public SizeUnit getWidthSizeUnit()
Component
getWidthSizeUnit
in interface Component
public void setWidth(java.lang.String width)
Component
Component.getWidthSizeUnit()
}public Component.Alignment getAlignment()
getAlignment
in interface Component
public void setAlignment(Component.Alignment alignment)
setAlignment
in interface Component
public java.lang.String getStyleName()
Component
getStyleName
in interface Component
public void setStyleName(java.lang.String name)
Component
setStyleName
in interface Component
name
- one or more style names separated by space.public void addStyleName(java.lang.String styleName)
Component
addStyleName
in interface Component
styleName
- one or more style names separated by space.public void removeStyleName(java.lang.String styleName)
Component
removeStyleName
in interface Component
styleName
- one or more style names separated by space.public <X> X unwrap(java.lang.Class<X> internalComponentClass)
Component
com.vaadin.ui.TextField vTextField = textField.unwrap(com.vaadin.ui.TextField.class);
@Nullable public <X> X unwrapOrNull(java.lang.Class<X> internalComponentClass)
Component
null
if underlying component cannot be casted to the given internalComponentClass
.
Example:
com.vaadin.ui.TextField vTextField = textField.unwrapOrNull(com.vaadin.ui.TextField.class);
unwrapOrNull
in interface Component
X
- type of internal classinternalComponentClass
- class of underlying component implementation based on Vaadin or Swingpublic <X> void withUnwrapped(java.lang.Class<X> internalComponentClass, java.util.function.Consumer<X> action)
Component
action
with underlying component if it can be casted to the given
internalComponentClass
.
Example:
textField.withUnwrapped(com.vaadin.ui.TextField.class, vTextField -> { // do something });
withUnwrapped
in interface Component
X
- type of internal classinternalComponentClass
- class of underlying component implementation based on Vaadin or Swingaction
- action to perform if underlying component can be casted to given classpublic <X> X unwrapComposition(java.lang.Class<X> internalCompositionClass)
Component
com.vaadin.ui.Layout vLayout = table.unwrapComposition(com.vaadin.ui.Layout.class);
unwrapComposition
in interface Component
X
- type of internal classinternalCompositionClass
- class of underlying composition implementation based on Vaadin or Swing@Nullable public <X> X unwrapCompositionOrNull(java.lang.Class<X> internalCompositionClass)
Component
internalCompositionClass
.
Example:
com.vaadin.ui.Layout vLayout = table.unwrapCompositionOrNull(com.vaadin.ui.Layout.class);
unwrapCompositionOrNull
in interface Component
X
- type of internal classinternalCompositionClass
- class of underlying composition implementation based on Vaadin or Swingpublic <X> void withUnwrappedComposition(java.lang.Class<X> internalCompositionClass, java.util.function.Consumer<X> action)
Component
action
.
table.withUnwrappedComposition(com.vaadin.ui.Layout.class, vLayout -> { // do something });
withUnwrappedComposition
in interface Component
X
- type of internal classinternalCompositionClass
- class of underlying composition implementation based on Vaadin or Swingaction
- to perform if underlying composition can be casted to given class