public interface PropertyViewGroup extends BoundComponentGroup<com.holonplatform.core.property.Property<?>,ViewComponent<?>>, ValueHolder<com.holonplatform.core.property.PropertyBox,GroupValueChangeEvent<com.holonplatform.core.property.PropertyBox,com.holonplatform.core.property.Property<?>,ViewComponent<?>,PropertyViewGroup>>
BoundComponentGroup which handles ViewComponent elements type and uses a Property set to
bind and identify the elements within the group.
As a ValueHolder, allows to manage the overall group elements value, represented by a PropertyBox
instance.
By default, the ViewComponent components to bind to each property are obtained using the
PropertyRenderers registered in the context PropertyRendererRegistry, if available. The
bind(...) methods of the PropertyViewGroupBuilder can be used to provided a specific renderer or
ViewComponent of one or more group property.
BoundComponentGroup.Binding<P,C extends HasComponent>ValueHolder.ValueChangeEvent<V>, ValueHolder.ValueChangeListener<V,E extends ValueHolder.ValueChangeEvent<V>>| Modifier and Type | Method and Description |
|---|---|
static <P extends com.holonplatform.core.property.Property> |
builder(Iterable<P> properties)
Get a
PropertyViewGroupBuilder to create and setup a PropertyViewGroup. |
static PropertyViewGroupBuilder |
builder(com.holonplatform.core.property.Property<?>... properties)
Get a
PropertyViewGroupBuilder to create and setup a PropertyViewGroup. |
void |
clear()
Clear the value of all the available
ViewComponents. |
com.holonplatform.core.property.PropertyBox |
getValue()
Get the current property values.
|
<T> Optional<ViewComponent<T>> |
getViewComponent(com.holonplatform.core.property.Property<T> property)
Get the
ViewComponent bound to the given property, if available. |
default <T> ViewComponent<T> |
requireViewComponent(com.holonplatform.core.property.Property<T> property)
Get the
ViewComponent bound to the given property, throwing a
Property.PropertyNotFoundException if not available. |
void |
setValue(com.holonplatform.core.property.PropertyBox value)
Set the current
PropertyBox value. |
getBindings, getElement, requireElementgetComponents, getElementsgetProperties, hasPropertyaddValueChangeListener, getEmptyValue, getValueIfPresent, isEmpty<T> Optional<ViewComponent<T>> getViewComponent(com.holonplatform.core.property.Property<T> property)
ViewComponent bound to the given property, if available.T - Property typeproperty - The property which identifies the ViewComponent within the group (not null)ViewComponent bound to the given propertydefault <T> ViewComponent<T> requireViewComponent(com.holonplatform.core.property.Property<T> property)
ViewComponent bound to the given property, throwing a
Property.PropertyNotFoundException if not available.T - Property typeproperty - The property which identifies the ViewComponent within the group (not null)ViewComponent bound to the given propertycom.holonplatform.core.property.Property.PropertyNotFoundException - If no ViewComponent is bound to given propertyvoid clear()
ViewComponents.clear in interface ValueHolder<com.holonplatform.core.property.PropertyBox,GroupValueChangeEvent<com.holonplatform.core.property.PropertyBox,com.holonplatform.core.property.Property<?>,ViewComponent<?>,PropertyViewGroup>>com.holonplatform.core.property.PropertyBox getValue()
getValue in interface ValueHolder<com.holonplatform.core.property.PropertyBox,GroupValueChangeEvent<com.holonplatform.core.property.PropertyBox,com.holonplatform.core.property.Property<?>,ViewComponent<?>,PropertyViewGroup>>PropertyBox containing the property values (may be null)void setValue(com.holonplatform.core.property.PropertyBox value)
PropertyBox value. For each property, if a ViewComponent is available, the
property value will be set as the ViewComponent value.
Only the properties which belong to the group's property set are taken into account.
setValue in interface ValueHolder<com.holonplatform.core.property.PropertyBox,GroupValueChangeEvent<com.holonplatform.core.property.PropertyBox,com.holonplatform.core.property.Property<?>,ViewComponent<?>,PropertyViewGroup>>value - The value to set. If null, all the ViewComponent components are cleared.static <P extends com.holonplatform.core.property.Property> PropertyViewGroupBuilder builder(Iterable<P> properties)
PropertyViewGroupBuilder to create and setup a PropertyViewGroup.P - Property typeproperties - The property set (not null)PropertyViewGroupBuilderstatic PropertyViewGroupBuilder builder(com.holonplatform.core.property.Property<?>... properties)
PropertyViewGroupBuilder to create and setup a PropertyViewGroup.properties - The property set (not null)PropertyViewGroupBuilderCopyright © 2019 The Holon Platform. All rights reserved.