- All Known Implementing Classes:
MFXComboBox,MFXFilterComboBox
public interface MFXCombo<T>
Public API every combo box must implement.
-
Property Summary
PropertiesTypePropertyDescriptionObjectProperty<Function<T,io.github.palexdev.virtualizedfx.cell.Cell<T>>> Specifies the function used to create the items cells in the popup.Specifies the converter used to convert an object of type T to a String.Specifies whether the combo box is editable or not.Specifies the combo box's items list.Specifies the combo box's action when the value property changes.Specifies the action to perform oncancel(String).Specifies the action to perform oncommit(String).Specifies the action when the popup is hidden.Specifies the action when the popup is hiding.Specifies the action when the popup is showing.Specifies the action when the popup is shown.Specifies the combo box's prompt text.Specifies the combo box's value, which does not necessarily coincides with the currently selected item. -
Method Summary
Modifier and TypeMethodDescriptionvoidIf the combo box is editable and the text has been changed, this method is responsible for deciding what to do with the new text on cancel.ObjectProperty<Function<T,io.github.palexdev.virtualizedfx.cell.Cell<T>>> Specifies the function used to create the items cells in the popup.voidIf the combo box is editable and the text has been changed, this method is responsible for deciding what to do with the new text on confirm.Specifies the converter used to convert an object of type T to a String.Specifies whether the combo box is editable or not.Gets the value of the property cellFactory.Gets the value of the property converter.getItems()Gets the value of the property items.Gets the value of the property onAction.Gets the value of the property onCancel.Gets the value of the property onCommit.Gets the value of the property onHidden.Gets the value of the property onHiding.Gets the value of the property onShowing.Gets the value of the property onShown.Gets the value of the property promptText.getValue()Gets the value of the property value.voidhide()Hides the popup.booleanGets the value of the property editable.Specifies the combo box's items list.Specifies the combo box's action when the value property changes.Specifies the action to perform oncancel(String).Specifies the action to perform oncommit(String).Specifies the action when the popup is hidden.Specifies the action when the popup is hiding.Specifies the action when the popup is showing.Specifies the action when the popup is shown.Specifies the combo box's prompt text.voidsetCellFactory(Function<T, io.github.palexdev.virtualizedfx.cell.Cell<T>> cellFactory) Sets the value of the property cellFactory.voidsetConverter(StringConverter<T> converter) Sets the value of the property converter.voidsetEditable(boolean editable) Sets the value of the property editable.voidsetItems(ObservableList<T> items) Sets the value of the property items.voidsetOnAction(EventHandler<ActionEvent> onAction) Sets the value of the property onAction.voidsetOnCancel(Consumer<String> onCancel) Sets the value of the property onCancel.voidsetOnCommit(Consumer<String> onCommit) Sets the value of the property onCommit.voidsetOnHidden(EventHandler<Event> onHidden) Sets the value of the property onHidden.voidsetOnHiding(EventHandler<Event> onHiding) Sets the value of the property onHiding.voidsetOnShowing(EventHandler<Event> onShowing) Sets the value of the property onShowing.voidsetOnShown(EventHandler<Event> onShown) Sets the value of the property onShown.voidsetPromptText(String promptText) Sets the value of the property promptText.voidSets the value of the property value.voidshow()Shows the popup.Specifies the combo box's value, which does not necessarily coincides with the currently selected item.
-
Property Details
-
value
ObjectProperty<T> valuePropertySpecifies the combo box's value, which does not necessarily coincides with the currently selected item.- See Also:
-
converter
ObjectProperty<StringConverter<T>> converterPropertySpecifies the converter used to convert an object of type T to a String. It is used, for example, to set the combo box text when an item is selected.- See Also:
-
editable
BooleanProperty editablePropertySpecifies whether the combo box is editable or not.- See Also:
-
onCommit
ConsumerProperty<String> onCommitPropertySpecifies the action to perform oncommit(String).- See Also:
-
onCancel
ConsumerProperty<String> onCancelPropertySpecifies the action to perform oncancel(String).- See Also:
-
promptText
StringProperty promptTextPropertySpecifies the combo box's prompt text.- See Also:
-
items
ObjectProperty<ObservableList<T>> itemsPropertySpecifies the combo box's items list.- See Also:
-
cellFactory
ObjectProperty<Function<T,io.github.palexdev.virtualizedfx.cell.Cell<T>>> cellFactoryPropertySpecifies the function used to create the items cells in the popup.- See Also:
-
onAction
ObjectProperty<EventHandler<ActionEvent>> onActionPropertySpecifies the combo box's action when the value property changes.- See Also:
-
onShowing
EventHandlerProperty<Event> onShowingPropertySpecifies the action when the popup is showing.- See Also:
-
onShown
EventHandlerProperty<Event> onShownPropertySpecifies the action when the popup is shown.- See Also:
-
onHiding
EventHandlerProperty<Event> onHidingPropertySpecifies the action when the popup is hiding.- See Also:
-
onHidden
EventHandlerProperty<Event> onHiddenPropertySpecifies the action when the popup is hidden.- See Also:
-
-
Method Details
-
show
void show()Shows the popup. -
hide
void hide()Hides the popup. -
getValue
T getValue()Gets the value of the property value.- Property description:
- Specifies the combo box's value, which does not necessarily coincides with the currently selected item.
-
valueProperty
ObjectProperty<T> valueProperty()Specifies the combo box's value, which does not necessarily coincides with the currently selected item.- See Also:
-
setValue
Sets the value of the property value.- Property description:
- Specifies the combo box's value, which does not necessarily coincides with the currently selected item.
-
getConverter
StringConverter<T> getConverter()Gets the value of the property converter.- Property description:
- Specifies the converter used to convert an object of type T to a String. It is used, for example, to set the combo box text when an item is selected.
-
converterProperty
ObjectProperty<StringConverter<T>> converterProperty()Specifies the converter used to convert an object of type T to a String. It is used, for example, to set the combo box text when an item is selected.- See Also:
-
setConverter
Sets the value of the property converter.- Property description:
- Specifies the converter used to convert an object of type T to a String. It is used, for example, to set the combo box text when an item is selected.
-
isEditable
boolean isEditable()Gets the value of the property editable.- Property description:
- Specifies whether the combo box is editable or not.
-
editableProperty
BooleanProperty editableProperty()Specifies whether the combo box is editable or not.- See Also:
-
setEditable
void setEditable(boolean editable) Sets the value of the property editable.- Property description:
- Specifies whether the combo box is editable or not.
-
commit
If the combo box is editable and the text has been changed, this method is responsible for deciding what to do with the new text on confirm. -
cancel
If the combo box is editable and the text has been changed, this method is responsible for deciding what to do with the new text on cancel. -
getOnCommit
Gets the value of the property onCommit.- Property description:
- Specifies the action to perform on
commit(String).
-
onCommitProperty
ConsumerProperty<String> onCommitProperty()Specifies the action to perform oncommit(String).- See Also:
-
setOnCommit
Sets the value of the property onCommit.- Property description:
- Specifies the action to perform on
commit(String).
-
getOnCancel
Gets the value of the property onCancel.- Property description:
- Specifies the action to perform on
cancel(String).
-
onCancelProperty
ConsumerProperty<String> onCancelProperty()Specifies the action to perform oncancel(String).- See Also:
-
setOnCancel
Sets the value of the property onCancel.- Property description:
- Specifies the action to perform on
cancel(String).
-
getPromptText
String getPromptText()Gets the value of the property promptText.- Property description:
- Specifies the combo box's prompt text.
-
promptTextProperty
StringProperty promptTextProperty()Specifies the combo box's prompt text.- See Also:
-
setPromptText
Sets the value of the property promptText.- Property description:
- Specifies the combo box's prompt text.
-
getItems
ObservableList<T> getItems()Gets the value of the property items.- Property description:
- Specifies the combo box's items list.
-
itemsProperty
ObjectProperty<ObservableList<T>> itemsProperty()Specifies the combo box's items list.- See Also:
-
setItems
Sets the value of the property items.- Property description:
- Specifies the combo box's items list.
-
getCellFactory
Gets the value of the property cellFactory.- Property description:
- Specifies the function used to create the items cells in the popup.
-
cellFactoryProperty
ObjectProperty<Function<T,io.github.palexdev.virtualizedfx.cell.Cell<T>>> cellFactoryProperty()Specifies the function used to create the items cells in the popup.- See Also:
-
setCellFactory
Sets the value of the property cellFactory.- Property description:
- Specifies the function used to create the items cells in the popup.
-
getSelectionModel
ISingleSelectionModel<T> getSelectionModel()- Returns:
- the combo box' selection model
-
getOnAction
EventHandler<ActionEvent> getOnAction()Gets the value of the property onAction.- Property description:
- Specifies the combo box's action when the value property changes.
-
onActionProperty
ObjectProperty<EventHandler<ActionEvent>> onActionProperty()Specifies the combo box's action when the value property changes.- See Also:
-
setOnAction
Sets the value of the property onAction.- Property description:
- Specifies the combo box's action when the value property changes.
-
getOnShowing
EventHandler<Event> getOnShowing()Gets the value of the property onShowing.- Property description:
- Specifies the action when the popup is showing.
-
onShowingProperty
EventHandlerProperty<Event> onShowingProperty()Specifies the action when the popup is showing.- See Also:
-
setOnShowing
Sets the value of the property onShowing.- Property description:
- Specifies the action when the popup is showing.
-
getOnShown
EventHandler<Event> getOnShown()Gets the value of the property onShown.- Property description:
- Specifies the action when the popup is shown.
-
onShownProperty
EventHandlerProperty<Event> onShownProperty()Specifies the action when the popup is shown.- See Also:
-
setOnShown
Sets the value of the property onShown.- Property description:
- Specifies the action when the popup is shown.
-
getOnHiding
EventHandler<Event> getOnHiding()Gets the value of the property onHiding.- Property description:
- Specifies the action when the popup is hiding.
-
onHidingProperty
EventHandlerProperty<Event> onHidingProperty()Specifies the action when the popup is hiding.- See Also:
-
setOnHiding
Sets the value of the property onHiding.- Property description:
- Specifies the action when the popup is hiding.
-
getOnHidden
EventHandler<Event> getOnHidden()Gets the value of the property onHidden.- Property description:
- Specifies the action when the popup is hidden.
-
onHiddenProperty
EventHandlerProperty<Event> onHiddenProperty()Specifies the action when the popup is hidden.- See Also:
-
setOnHidden
Sets the value of the property onHidden.- Property description:
- Specifies the action when the popup is hidden.
-