Class FieldComponent<V>
java.lang.Object
org.dellroad.stuff.vaadin24.field.FieldComponent<V>
- Type Parameters:
V
- field value type
- All Implemented Interfaces:
Serializable
A combination of a
HasValue
field and its corresponding Component
.
Usually, but not always, these are the same object - for example, with subclasses of AbstractField
like ComboBox
and TextField
.
An example of when they are not the same is when a Grid
is used as the visual component for a single select
single select field created via Grid.asSingleSelect()
or multi-select field created via Grid.asMultiSelect()
.
- See Also:
-
Constructor Summary
ConstructorDescriptionFieldComponent
(AbstractField<?, V> field) Constructor.FieldComponent
(HasValue<?, V> field, Component component) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionAbstractField<?,
V> Get this instance's field as anAbstractField
, assuming that's what it is.Get the component to be displayed.getField()
Get the field bound into theBinder
.toString()
-
Constructor Details
-
FieldComponent
Constructor.- Parameters:
field
- fieldcomponent
- corresponding component- Throws:
IllegalArgumentException
- if either parameter is null
-
FieldComponent
Constructor.- Parameters:
field
- field- Throws:
IllegalArgumentException
- iffield
is null
-
-
Method Details
-
getField
Get the field bound into theBinder
.- Returns:
- bound field
-
getComponent
Get the component to be displayed.- Returns:
- field's component
-
getAbstractField
Get this instance's field as anAbstractField
, assuming that's what it is.- Returns:
- this instance's field
- Throws:
IllegalArgumentException
- if this instance's field is not anAbstractField
-
toString
-