Class AbstractGridFieldBuilder<S extends AbstractGridFieldBuilder<S,T>,T>
java.lang.Object
org.dellroad.stuff.vaadin24.field.AbstractFieldBuilder<S,T>
org.dellroad.stuff.vaadin24.field.AbstractGridFieldBuilder<S,T>
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
FieldBuilder
public class AbstractGridFieldBuilder<S extends AbstractGridFieldBuilder<S,T>,T>
extends AbstractFieldBuilder<S,T>
Extension of
AbstractFieldBuilder
that adds the @FieldBuilder.GridSingleSelect
and @FieldBuilder.GridMultiSelect
annotations.
These annotations require special handling because they are not normal fields.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
Specifies how a Java bean property should be edited using aGrid
converted to a multi-select field viaGrid.asMultiSelect()
.static @interface
Specifies how a Java bean property should be edited using aGrid
converted to a single-select field viaGrid.asSingleSelect()
.Nested classes/interfaces inherited from class org.dellroad.stuff.vaadin24.field.AbstractFieldBuilder
AbstractFieldBuilder.Binding, AbstractFieldBuilder.BindingInfo, AbstractFieldBuilder.DefaultInfo, AbstractFieldBuilder.EnabledBy, AbstractFieldBuilder.FieldDefault, AbstractFieldBuilder.FormLayout, AbstractFieldBuilder.NullifyCheckbox, AbstractFieldBuilder.ProvidesField
-
Field Summary
Fields inherited from class org.dellroad.stuff.vaadin24.field.AbstractFieldBuilder
DEFAULT_ANNOTATION_DEFAULTS_METHOD_NAME, DEFAULT_IMPLEMENTATION_PROPERTY_NAME
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractGridFieldBuilder
(Class<T> type) Constructor.protected
AbstractGridFieldBuilder
(AbstractGridFieldBuilder<S, T> original) Static information copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected FieldComponent<?>
buildDeclarativeField
(AbstractFieldBuilder<S, T>.BindingInfo bindingInfo) Construct and configure a field based on a@FieldBuilder.Foo
declarative annotation.protected Grid<?>
buildGrid
(AbstractFieldBuilder<S, T>.BindingInfo bindingInfo, GridColumn column) protected Stream<Class<? extends Annotation>>
Get all of the widget annotation types defined for this class.Methods inherited from class org.dellroad.stuff.vaadin24.field.AbstractFieldBuilder
addFieldComponents, applyFieldDefaultAnnotations, bindFields, buildProvidedField, createBindingInfo, getAnnotationDefaultsMethod, getAnnotationDefaultsMethodName, getDefaultsFor, getDefaultsFor, getFieldComponents, getImplementationPropertyName, getScannedFieldDefaults, getScannedProperties, getType, instantiate, instantiate, newFieldBuilderContext, scanForAnnotations, scanForFieldDefaultAnnotations
-
Constructor Details
-
AbstractGridFieldBuilder
Constructor.- Parameters:
type
- backing object type
-
AbstractGridFieldBuilder
Static information copy constructor.Only the static information gathered by this instance by scanning for annotations is copied. Any previously bound fields are not copied.
- Parameters:
original
- original instance- Throws:
IllegalArgumentException
- iforiginal
is null
-
-
Method Details
-
getDeclarativeAnnotationTypes
Get all of the widget annotation types defined for this class.The implementation in
AbstractFieldBuilder
returns the types of all annotations found on the annotation defaults method.The implementation in
AbstractGridFieldBuilder
adds@FieldBuilder.GridSingleSelect
and@FieldBuilder.GridMultiSelect
.- Overrides:
getDeclarativeAnnotationTypes
in classAbstractFieldBuilder<S extends AbstractGridFieldBuilder<S,
T>, T> - Returns:
- widget annotation types
-
buildDeclarativeField
protected FieldComponent<?> buildDeclarativeField(AbstractFieldBuilder<S, T>.BindingInfo bindingInfo) Description copied from class:AbstractFieldBuilder
Construct and configure a field based on a@FieldBuilder.Foo
declarative annotation.- Overrides:
buildDeclarativeField
in classAbstractFieldBuilder<S extends AbstractGridFieldBuilder<S,
T>, T> - Parameters:
bindingInfo
- field binding context- Returns:
- new field
-
buildGrid
-