show() and
hide() methods are called, however commonly this results in either
a popup or dialog appearing that allows for the user to provide the
required information.
A ComboBox has a value property that represents
the current user input. This may be based on a selection from a drop-down list,
or it may be from user input when the ComboBox is
editable.
An editable ComboBox is one which provides some
means for an end-user to provide input for values that are not otherwise
options available to them. For example, in the ComboBox implementation,
an editable ComboBox provides a TextField that may be typed into.
As mentioned above, when the user commits textual input into the textfield
(commonly by pressing the Enter keyboard key), the
value property will be updated.
The purpose of the separation between this class and, say, ComboBox
is to allow for ComboBox-like controls that do not necessarily pop up a list
of items. Examples of other implementations include color pickers, calendar
pickers, etc. The ComboBox class provides the default, and most commonly
expected implementation. Refer to that classes javadoc for more information.
ComboBox
| Modifier and Type | Field and Description |
|---|---|
| private final BooleanProperty | |
| private static final String | |
| private final BooleanProperty | |
| public static final EventType | ON_HIDDEN
Called when the ComboBox popup/display has been hidden. |
| public static final EventType | ON_HIDING
Called when the ComboBox popup/display will be hidden. |
| public static final EventType | ON_SHOWING
Called prior to the ComboBox showing its popup/display after the user has clicked or otherwise interacted with the ComboBox. |
| public static final EventType | ON_SHOWN
Called after the ComboBox has shown its popup/display. |
| private ObjectProperty | |
| private ObjectProperty | onHidden
Called just after the |
| private ObjectProperty | |
| private ObjectProperty | onShowing
Called just prior to the |
| private ObjectProperty | onShown
Called just after the |
| private StringProperty | promptText
The |
| private static final PseudoClass | |
| private static final PseudoClass | |
| private static final PseudoClass | |
| private ReadOnlyBooleanWrapper | showing
Represents the current state of the ComboBox popup, and whether it is currently visible on screen (although it may be hidden behind other windows). |
| private final ObjectProperty |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public final BooleanProperty | Returns: the armed propertyIndicates that the ComboBox has been "armed" such that a mouse release
will cause the ComboBox |
| public void | |
| public final BooleanProperty | Returns: the editable propertySpecifies whether the ComboBox allows for user input. |
| public void | executeAccessibleAction(AccessibleAction
the action to execute action, Object... optional list of parameters parameters)Overrides javafx. This method is called by the assistive technology to request the action indicated by the argument should be executed. |
| public final EventHandler | |
| public final EventHandler | |
| public final EventHandler | |
| public final EventHandler | |
| public final EventHandler | |
| public final String | |
| public final T | |
| public void | |
| public final boolean | |
| public final boolean | |
| public final boolean | |
| public final ObjectProperty | Returns: the on action propertyThe ComboBox action, which is invoked whenever the ComboBox
|
| public final ObjectProperty | |
| public final ObjectProperty | |
| public final ObjectProperty | |
| public final ObjectProperty | |
| public final StringProperty | |
| public Object | queryAccessibleAttribute(AccessibleAttribute
the requested attribute attribute, Object... optional list of parameters parameters)Overrides javafx. This method is called by the assistive technology to request the value for an attribute. |
| private final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| private void | |
| public final void | |
| public void | |
| public final ReadOnlyBooleanProperty | |
| private ReadOnlyBooleanWrapper | |
| public final ObjectProperty | Returns: the value propertyThe value of this ComboBox is defined as the selected item if the input is not editable, or if it is editable, the most recent user action: either the value input by the user, or the last selected item. |
| armed | back to summary |
|---|---|
| private final BooleanProperty armed | |
| DEFAULT_STYLE_CLASS | back to summary |
|---|---|
| private static final String DEFAULT_STYLE_CLASS | |
| editable | back to summary |
|---|---|
| private final BooleanProperty editable | |
| ON_HIDDEN | back to summary |
|---|---|
| public static final EventType<Event> ON_HIDDEN Called when the ComboBox popup/display has been hidden.
| |
| ON_HIDING | back to summary |
|---|---|
| public static final EventType<Event> ON_HIDING Called when the ComboBox popup/display will be hidden.
| |
| ON_SHOWING | back to summary |
|---|---|
| public static final EventType<Event> ON_SHOWING Called prior to the ComboBox showing its popup/display after the user has clicked or otherwise interacted with the ComboBox.
| |
| ON_SHOWN | back to summary |
|---|---|
| public static final EventType<Event> ON_SHOWN Called after the ComboBox has shown its popup/display.
| |
| onAction | back to summary |
|---|---|
| private ObjectProperty<EventHandler<ActionEvent>> onAction | |
| onHidden | back to summary |
|---|---|
| private ObjectProperty<EventHandler<Event>> onHidden Called just after the
| |
| onHiding | back to summary |
|---|---|
| private ObjectProperty<EventHandler<Event>> onHiding Called just prior to the
| |
| onShowing | back to summary |
|---|---|
| private ObjectProperty<EventHandler<Event>> onShowing Called just prior to the
| |
| onShown | back to summary |
|---|---|
| private ObjectProperty<EventHandler<Event>> onShown Called just after the
| |
| promptText | back to summary |
|---|---|
| private StringProperty promptText The | |
| PSEUDO_CLASS_ARMED | back to summary |
|---|---|
| private static final PseudoClass PSEUDO_CLASS_ARMED | |
| PSEUDO_CLASS_EDITABLE | back to summary |
|---|---|
| private static final PseudoClass PSEUDO_CLASS_EDITABLE | |
| PSEUDO_CLASS_SHOWING | back to summary |
|---|---|
| private static final PseudoClass PSEUDO_CLASS_SHOWING | |
| showing | back to summary |
|---|---|
| private ReadOnlyBooleanWrapper showing Represents the current state of the ComboBox popup, and whether it is currently visible on screen (although it may be hidden behind other windows). | |
| value | back to summary |
|---|---|
| private final ObjectProperty<T> value | |
| ComboBoxBase | back to summary |
|---|---|
| public ComboBoxBase() Creates a default ComboBoxBase instance. | |
| arm | back to summary |
|---|---|
| public void arm() Arms the ComboBox. An armed ComboBox will show a popup list on the next expected UI gesture. Note This function is intended to be used by experts, primarily by those implementing new Skins or Behaviors. It is not common for developers or designers to access this function directly. | |
| armedProperty | back to summary |
|---|---|
| public final BooleanProperty armedProperty() Indicates that the ComboBox has been "armed" such that a mouse release
will cause the ComboBox
| |
| disarm | back to summary |
|---|---|
| public void disarm() Disarms the ComboBox. See Note This function is intended to be used by experts, primarily by those implementing new Skins or Behaviors. It is not common for developers or designers to access this function directly. | |
| editableProperty | back to summary |
|---|---|
| public final BooleanProperty editableProperty() Specifies whether the ComboBox allows for user input. When editable is
true, the ComboBox has a text input area that a user may type in to. This
input is then available via the Note that when the editable property changes, the value property is reset, along with any other relevant state.
| |
| executeAccessibleAction | back to summary |
|---|---|
| public void executeAccessibleAction(AccessibleAction action, Object... parameters) Overrides javafx. Doc from javafx. This method is called by the assistive technology to request the action indicated by the argument should be executed.
This method is commonly overridden by subclasses to implement
action that are required for a specific role.
| |
| getOnAction | back to summary |
|---|---|
| public final EventHandler | |
| getOnHidden | back to summary |
|---|---|
| public final EventHandler | |
| getOnHiding | back to summary |
|---|---|
| public final EventHandler | |
| getOnShowing | back to summary |
|---|---|
| public final EventHandler | |
| getOnShown | back to summary |
|---|---|
| public final EventHandler | |
| getPromptText | back to summary |
|---|---|
| public final String getPromptText() | |
| getValue | back to summary |
|---|---|
| public final T getValue() | |
| hide | back to summary |
|---|---|
| public void hide() Closes the popup / dialog that was shown when | |
| isArmed | back to summary |
|---|---|
| public final boolean isArmed() | |
| isEditable | back to summary |
|---|---|
| public final boolean isEditable() | |
| isShowing | back to summary |
|---|---|
| public final boolean isShowing() | |
| onActionProperty | back to summary |
|---|---|
| public final ObjectProperty The ComboBox action, which is invoked whenever the ComboBox
| |
| onHiddenProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| onHidingProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| onShowingProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| onShownProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| promptTextProperty | back to summary |
|---|---|
| public final StringProperty promptTextProperty() | |
| queryAccessibleAttribute | back to summary |
|---|---|
| public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters) Overrides javafx. Doc from javafx. This method is called by the assistive technology to request the value for an attribute.
This method is commonly overridden by subclasses to implement
attributes that are required for a specific role.
| |
| setArmed | back to summary |
|---|---|
| private final void setArmed(boolean value) | |
| setEditable | back to summary |
|---|---|
| public final void setEditable(boolean value) | |
| setOnAction | back to summary |
|---|---|
| public final void setOnAction(EventHandler<ActionEvent> value) | |
| setOnHidden | back to summary |
|---|---|
| public final void setOnHidden(EventHandler<Event> value) | |
| setOnHiding | back to summary |
|---|---|
| public final void setOnHiding(EventHandler<Event> value) | |
| setOnShowing | back to summary |
|---|---|
| public final void setOnShowing(EventHandler<Event> value) | |
| setOnShown | back to summary |
|---|---|
| public final void setOnShown(EventHandler<Event> value) | |
| setPromptText | back to summary |
|---|---|
| public final void setPromptText(String value) | |
| setShowing | back to summary |
|---|---|
| private void setShowing(boolean value) | |
| setValue | back to summary |
|---|---|
| public final void setValue(T value) | |
| show | back to summary |
|---|---|
| public void show() Requests that the ComboBox display the popup aspect of the user interface.
As mentioned in the | |
| showingProperty | back to summary |
|---|---|
| public final ReadOnlyBooleanProperty showingProperty() | |
| showingPropertyImpl | back to summary |
|---|---|
| private ReadOnlyBooleanWrapper showingPropertyImpl() | |
| valueProperty | back to summary |
|---|---|
| public final ObjectProperty The value of this ComboBox is defined as the selected item if the input is not editable, or if it is editable, the most recent user action: either the value input by the user, or the last selected item.
| |