public class SingleSelectionField<V> extends SelectionField<V,SingleSelectionField<V>>
SelectionField
allowing
only for single selection.Type | Property and Description |
---|---|
ObjectProperty<V> |
selection |
itemsProperty
changedProperty, editableProperty, errorMessagesProperty, idProperty, labelProperty, placeholderProperty, requiredProperty, spanProperty, styleClassProperty, tooltipProperty, validProperty
Modifier and Type | Method and Description |
---|---|
SingleSelectionField<V> |
bind(ListProperty<V> itemsBinding,
ObjectProperty<V> selectionBinding)
Binds the given items and selection property with the corresponding
fields.
|
SingleSelectionField<V> |
deselect()
Removes the selection on the current field.
|
V |
getSelection()
Gets the value of the property selection.
|
SingleSelectionField<V> |
items(List<V> newValue)
Updates the list of available items to a new list, without a
pre-defined selection.
|
SingleSelectionField<V> |
items(List<V> newValue,
int newSelection)
Updates the list of available items to a new list, along with a
pre-defined selection.
|
SingleSelectionField<V> |
select(int index)
Sets the selection to the element at the given index.
|
ObjectProperty<V> |
selectionProperty() |
void |
setBindingMode(BindingMode newValue)
Activates or deactivates the
bindingModeListener based on the
given BindingMode . |
SingleSelectionField<V> |
unbind(ListProperty<V> itemsBinding,
ObjectProperty<V> selectionBinding)
Unbinds the given items and selection property with the corresponding
fields.
|
SingleSelectionField<V> |
validate(Validator<V>... newValue)
Sets the list of validators for the current field.
|
getItems, itemsProperty
changedProperty, editable, editableProperty, errorMessagesProperty, getErrorMessages, getID, getLabel, getPlaceholder, getRenderer, getSpan, getStyleClass, getTooltip, hasChanged, id, idProperty, isEditable, isI18N, isRequired, isValid, label, labelProperty, ofBooleanType, ofBooleanType, ofDoubleType, ofDoubleType, ofIntegerType, ofIntegerType, ofMultiSelectionType, ofMultiSelectionType, ofMultiSelectionType, ofSingleSelectionType, ofSingleSelectionType, ofSingleSelectionType, ofStringType, ofStringType, placeholder, placeholderProperty, render, required, required, requiredProperty, span, span, spanProperty, styleClass, styleClassProperty, tooltip, tooltipProperty, validProperty
public ObjectProperty<V> selectionProperty
getSelection()
public SingleSelectionField<V> items(List<V> newValue, int newSelection)
newValue
- The new list of items.newSelection
- The new pre-defined selection.public SingleSelectionField<V> items(List<V> newValue)
newValue
- The new list of items.@SafeVarargs public final SingleSelectionField<V> validate(Validator<V>... newValue)
newValue
- The validators that are to be used for validating this
field.public SingleSelectionField<V> select(int index)
index
- The index of the element to be selected.public SingleSelectionField<V> deselect()
public SingleSelectionField<V> bind(ListProperty<V> itemsBinding, ObjectProperty<V> selectionBinding)
itemsBinding
- The items property to be bound with.selectionBinding
- The selection property to be bound with.public SingleSelectionField<V> unbind(ListProperty<V> itemsBinding, ObjectProperty<V> selectionBinding)
itemsBinding
- The items property to be unbound with.selectionBinding
- The selection property to be unbound with.public void setBindingMode(BindingMode newValue)
bindingModeListener
based on the
given BindingMode
.newValue
- The new binding mode for the current field.public V getSelection()
public ObjectProperty<V> selectionProperty()
getSelection()
Copyright © 2017. All rights reserved.