public class MultiSelectionField<V> extends SelectionField<V,MultiSelectionField<V>>
MultiSelectionField
allowing for multi-selection.Type | Property and Description |
---|---|
ListProperty<V> |
selection |
itemsProperty
changedProperty, editableProperty, errorMessagesProperty, idProperty, labelProperty, placeholderProperty, requiredProperty, spanProperty, styleClassProperty, tooltipProperty, validProperty
Modifier and Type | Method and Description |
---|---|
MultiSelectionField<V> |
bind(ListProperty<V> itemsBinding,
ListProperty<V> selectionBinding)
Binds the given items and selection property with the corresponding
fields.
|
MultiSelectionField<V> |
deselect(int index)
Removes the element at the given index from the current selection.
|
ObservableList<V> |
getSelection()
Gets the value of the property selection.
|
MultiSelectionField<V> |
items(List<V> newValue)
Updates the list of available items to a new list, without a
pre-defined selection.
|
MultiSelectionField<V> |
items(List<V> newValue,
List<Integer> newSelection)
Updates the list of available items to a new list, along with a
pre-defined selection.
|
MultiSelectionField<V> |
select(int index)
Adds the element at the given index to the current selection.
|
ListProperty<V> |
selectionProperty() |
void |
setBindingMode(BindingMode newValue)
Activates or deactivates the
bindingModeListener based on the
given BindingMode . |
MultiSelectionField<V> |
unbind(ListProperty<V> itemsBinding,
ListProperty<V> selectionBinding)
Unbinds the given items and selection property with the corresponding
fields.
|
MultiSelectionField<V> |
validate(Validator<ObservableList<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 ListProperty<V> selectionProperty
getSelection()
public MultiSelectionField<V> items(List<V> newValue, List<Integer> newSelection)
newValue
- The new list of items.newSelection
- The new pre-defined selection.public MultiSelectionField<V> items(List<V> newValue)
newValue
- The new list of items.@SafeVarargs public final MultiSelectionField<V> validate(Validator<ObservableList<V>>... newValue)
newValue
- The validators that are to be used for validating this
field.public MultiSelectionField<V> select(int index)
index
- The index of the element to be selected.public MultiSelectionField<V> deselect(int index)
index
- The index of the element to be removed.public MultiSelectionField<V> bind(ListProperty<V> itemsBinding, ListProperty<V> selectionBinding)
itemsBinding
- The items property to be bound with.selectionBinding
- The selection property to be bound with.public MultiSelectionField<V> unbind(ListProperty<V> itemsBinding, ListProperty<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 ObservableList<V> getSelection()
public ListProperty<V> selectionProperty()
getSelection()
Copyright © 2017. All rights reserved.