A versatile and customizable selection control that combines the features of ComboBox
and ChoiceBox with enhanced selection capabilities.
Unlike ComboBox and ChoiceBox, which are limited to single selection modes, SelectionBox
supports both single and multiple selection modes, providing greater flexibility for various UI requirements.
Additionally, SelectionBox offers the ability to add extra buttons, enabling users to perform
common selection actions swiftly, such as selecting all items, clearing selections, or applying predefined selection criteria.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private BooleanProperty | |
| private BooleanProperty | |
| private final ObjectProperty | |
| private final ReadOnlyObjectWrapper | |
| private static final boolean | |
| private static final boolean | |
| private static final String | |
| private ObjectProperty | |
| private ObjectProperty | |
| private final ListProperty | |
| private final ObjectProperty | left
Hides javafx. |
| private ObjectProperty | |
| private ObjectProperty | |
| private ObjectProperty | |
| private ObjectProperty | |
| private final ObjectProperty | |
| private StringProperty | |
| private BooleanProperty | |
| private final ObjectProperty | |
| private ObjectProperty | |
| private final ObjectProperty | |
| private final ObjectProperty | top
Hides javafx. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | SelectionBox(Collection<T>
the collection of items to populate the SelectionBox items)Constructs a new selection box with the specified collection of items. |
| public | SelectionBox(T...
The initial items to populate the selection box.
These items will be added to the selection box's list of choices. items)Constructs a new selection box and populates it with the provided items. |
| Modifier and Type | Method and Description |
|---|---|
| public final BooleanProperty | |
| public final BooleanProperty | Returns: a BooleanProperty to control the auto-hide behavior of the popup.Controls whether the popup should auto-hide when an item or the extra button is clicked. |
| public final ObjectProperty | |
| protected Skin | createDefaultSkin()
Overrides javafx. Create a new instance of the default skin for this control. |
| public Button | Returns: the created Button instancethe text to be displayed on the button text, Runnable the action to be executed when the button is clicked action)Creates an extra button with the specified text and action. |
| public Button | Returns: the created Button instancethe text to be displayed on the button text, Node the graphic node to be displayed on the button graphic, Runnable the action to be executed when the button is clicked action)Creates an extra button with the specified text, graphic, and action. |
| private Node | |
| public final ReadOnlyObjectProperty | Returns: a read-onlySelectionMode propertyProvides a read-only property that directly exposes the current
|
| public final Node | |
| public static List | getClassCssMetaData()
Hides javafx. Gets the |
| public List | getControlCssMetaData()
Overrides javafx. Gets the unmodifiable list of the control's CSS-styleable properties. |
| public final SelectionMode | |
| private ObjectBinding | Returns: anObjectBinding that provides the current SelectionMode
of the MultipleSelectionModel, or null if no
selection model is setCreates and returns an |
| public final Node | |
| public final StringConverter | |
| public final ObservableList | |
| public final Node | |
| public final EventHandler | |
| public final EventHandler | |
| public final EventHandler | |
| public final EventHandler | |
| public final Node | |
| public final String | |
| public final Node | |
| public final StringConverter | |
| public final MultipleSelectionModel | |
| public final Node | |
| public String | getUserAgentStylesheet()
Overrides javafx. An implementation may specify its own user-agent styles for this Region, and its children, by overriding this method. |
| public final ObjectProperty | Returns: the ObjectProperty containing the graphical Node.Returns the graphic property of this ChoicePicker. |
| public final void | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final ObjectProperty | Returns: the property object for the string converter used to format individual items.Retrieves the property object for the string converter that formats the display of individual items. |
| public final ListProperty | Returns: the list property containing the itemsThe list of items to be displayed in the SelectionBox. |
| public final ObjectProperty | |
| public final ObjectProperty | Returns: the property holding the handler invoked after the popup is hiddenThe event handler property invoked after the SelectionPopup has been hidden. |
| public final ObjectProperty | Returns: the property holding the handler invoked before the popup is hiddenThe event handler property invoked before the SelectionPopup is hidden. |
| public final ObjectProperty | Returns: the property holding the handler invoked before showing the popupThe event handler property invoked before the SelectionPopup is shown. |
| public final ObjectProperty | Returns: the property holding the handler invoked after the popup is shownThe event handler property invoked after the SelectionPopup has been shown. |
| public final ObjectProperty | Returns: the placeholder propertyReturns the property holding the placeholder node, which is displayed when there are no items. |
| public final StringProperty | Returns: the StringProperty containing the prompt text.Returns the prompt text property of this SelectionBox. |
| public final BooleanProperty | Returns: the BooleanProperty controlling the read-only state of the SelectionBox.Returns the BooleanProperty that controls the read-only state of the SelectionBox. |
| public final ObjectProperty | |
| public final ObjectProperty | Returns: the property object for the string converter that formats the display of selected items.Retrieves the property object for a string converter used to format the display of selected items. |
| public final ObjectProperty | Returns: the ObjectProperty containing the selection model.Returns the property object for the selection model used by this SelectionBox. |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final ObjectProperty |