Class ChoiceBox<T>
- Type Parameters:
-
T- the type of the item contained within the ChoiceBox
- All Implemented Interfaces:
-
Styleable,EventTarget,Skinnable
@DefaultProperty("items") public class ChoiceBox<T> extends Control By default, the ChoiceBox has no item selected unless otherwise specified. Although the ChoiceBox will only allow a user to select from the predefined list, it is possible for the developer to specify the selected item to be something other than what is available in the predefined list. This is required for several important use cases. Configuration of the ChoiceBox is order independent. You may either specify the items and then the selected item, or you may specify the selected item and then the items. Either way will function correctly.
ChoiceBox item selection is handled by SelectionModel. As with ListView and ComboBox, it is possible to modify the SelectionModel that is used, although this is likely to be rarely changed. ChoiceBox supports only a single selection model, hence the default used is a SingleSelectionModel.
Example:
ChoiceBox cb = new ChoiceBox();
cb.getItems().addAll("item1", "item2", "item3"); - Since:
- JavaFX 2.0
Property Summary
| Type | Property | Description |
|---|---|---|
final ObjectProperty |
converter |
Allows a way to specify how to represent objects in the items list. |
final ObjectProperty |
items |
The items to display in the choice box. |
final ObjectProperty |
onAction |
The ChoiceBox action, which is invoked whenever the ChoiceBox value property is changed. |
final ObjectProperty |
onHidden |
Called just after the ChoiceBox popup has been hidden. |
final ObjectProperty |
onHiding |
Called just prior to the ChoiceBox popup being hidden. |
final ObjectProperty |
onShowing |
Called just prior to the ChoiceBox popup being shown. |
final ObjectProperty |
onShown |
Called just after the ChoiceBox popup is shown. |
final ObjectProperty |
selectionModel |
The selection model for the ChoiceBox. |
final ReadOnlyBooleanProperty |
showing |
Indicates whether the drop down is displaying the list of choices to the user. |
final ObjectProperty |
value |
The value of this ChoiceBox is defined as the selected item in the ChoiceBox selection model. |
Properties declared in class javafx.scene.control.Control
contextMenu, skin, tooltip
Properties declared in class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width
Properties declared in class javafx.scene.Parent
needsLayout
Properties declared in class javafx.scene.Node
accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, focusVisible, focusWithin, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
Field Summary
| Modifier and Type | Field | Description |
|---|---|---|
static final EventType |
ON_HIDDEN |
Called when the ChoiceBox popup has been hidden. |
static final EventType |
ON_HIDING |
Called when the ChoiceBox popup will be hidden. |
static final EventType |
ON_SHOWING |
Called prior to the ChoiceBox showing its popup after the user has clicked or otherwise interacted with the ChoiceBox. |
static final EventType |
ON_SHOWN |
Called after the ChoiceBox has shown its popup. |
Fields declared in class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZE
Fields declared in class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT
Constructor Summary
| Constructor | Description |
|---|---|
ChoiceBox() |
Create a new ChoiceBox which has an empty list of items. |
ChoiceBox |
Create a new ChoiceBox with the given set of items. |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
final ObjectProperty |
converterProperty() |
Allows a way to specify how to represent objects in the items list. |
final StringConverter |
getConverter() |
Gets the value of the converter property. |
final ObservableList |
getItems() |
Gets the value of the items property. |
final EventHandler |
getOnAction() |
Gets the value of the onAction property. |
final EventHandler |
getOnHidden() |
Gets the value of the onHidden property. |
final EventHandler |
getOnHiding() |
Gets the value of the onHiding property. |
final EventHandler |
getOnShowing() |
Gets the value of the onShowing property. |
final EventHandler |
getOnShown() |
Gets the value of the onShown property. |
final SingleSelectionModel |
getSelectionModel() |
Gets the value of the selectionModel property. |
final T |
getValue() |
Gets the value of the value property. |
void |
hide() |
Closes the list of choices. |
final boolean |
isShowing() |
Gets the value of the showing property. |
final ObjectProperty |
itemsProperty() |
The items to display in the choice box. |
final ObjectProperty |
onActionProperty() |
The ChoiceBox action, which is invoked whenever the ChoiceBox value property is changed. |
final ObjectProperty |
onHiddenProperty() |
Called just after the ChoiceBox popup has been hidden. |
final ObjectProperty |
onHidingProperty() |
Called just prior to the ChoiceBox popup being hidden. |
final ObjectProperty |
onShowingProperty() |
Called just prior to the ChoiceBox popup being shown. |
final ObjectProperty |
onShownProperty() |
Called just after the ChoiceBox popup is shown. |
final ObjectProperty |
selectionModelProperty() |
The selection model for the ChoiceBox. |
final void |
setConverter |
Sets the value of the converter property. |
final void |
setItems |
Sets the value of the items property. |
final void |
setOnAction |
Sets the value of the onAction property. |
final void |
setOnHidden |
Sets the value of the onHidden property. |
final void |
setOnHiding |
Sets the value of the onHiding property. |
final void |
setOnShowing |
Sets the value of the onShowing property. |
final void |
setOnShown |
Sets the value of the onShown property. |
final void |
setSelectionModel |
Sets the value of the selectionModel property. |
final void |
setValue |
Sets the value of the value property. |
void |
show() |
Opens the list of choices. |
final ReadOnlyBooleanProperty |
showingProperty() |
Indicates whether the drop down is displaying the list of choices to the user. |
final ObjectProperty |
valueProperty() |
The value of this ChoiceBox is defined as the selected item in the ChoiceBox selection model. |
Methods declared in class javafx.scene.control.Control
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, contextMenuProperty, createDefaultSkin, getClassCssMetaData, getContextMenu, getControlCssMetaData, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, setContextMenu, setSkin, setTooltip, skinProperty, tooltipProperty
Methods declared in class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computePrefHeight, computePrefWidth, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty
Methods declared in class javafx.scene.Parent
getBaselineOffset, getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, layoutChildren, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
Methods declared in class javafx.scene.Node
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isFocusVisible, isFocusWithin, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookup, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, queryAccessibleAttribute, relocate, removeEventFilter, removeEventHandler, requestFocus, requestFocusTraversal, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods declared in interface javafx.css.Styleable
getStyleableNode
Property Details
selectionModel
public final ObjectProperty<SingleSelectionModel<T>> selectionModelProperty
- See Also:
showing
public final ReadOnlyBooleanProperty showingProperty
- See Also:
items
public final ObjectProperty<ObservableList<T>> itemsProperty
- See Also:
converter
public final ObjectProperty<StringConverter<T>> converterProperty
javafx.util.converter package can be set.- Since:
- JavaFX 2.1
- See Also:
value
public final ObjectProperty<T> valueProperty
- Since:
- JavaFX 2.1
- See Also:
onAction
public final ObjectProperty<EventHandler<ActionEvent>> onActionProperty
value property is changed. This may be due to the value property being programmatically changed or when the user selects an item in a popup menu.- Since:
- JavaFX 8u60
- See Also:
onShowing
public final ObjectProperty<EventHandler<Event>> onShowingProperty
ChoiceBox popup being shown.- Since:
- JavaFX 8u60
- See Also:
onShown
public final ObjectProperty<EventHandler<Event>> onShownProperty
ChoiceBox popup is shown.- Since:
- JavaFX 8u60
- See Also:
onHiding
public final ObjectProperty<EventHandler<Event>> onHidingProperty
ChoiceBox popup being hidden.- Since:
- JavaFX 8u60
- See Also:
onHidden
public final ObjectProperty<EventHandler<Event>> onHiddenProperty
ChoiceBox popup has been hidden.- Since:
- JavaFX 8u60
- See Also:
Field Details
ON_SHOWING
public static final EventType<Event> ON_SHOWING
- Since:
- JavaFX 8u60
ON_SHOWN
public static final EventType<Event> ON_SHOWN
- Since:
- JavaFX 8u60
ON_HIDING
public static final EventType<Event> ON_HIDING
- Since:
- JavaFX 8u60
ON_HIDDEN
public static final EventType<Event> ON_HIDDEN
- Since:
- JavaFX 8u60
Constructor Details
ChoiceBox
public ChoiceBox()
ChoiceBox
public ChoiceBox(ObservableList<T> items)
- Parameters:
-
items- the set of items
Method Details
setSelectionModel
public final void setSelectionModel(SingleSelectionModel<T> value)
selectionModel property.- Property description:
- The selection model for the ChoiceBox. Only a single choice can be made, hence, the ChoiceBox supports only a SingleSelectionModel. Generally, the main interaction with the selection model is to explicitly set which item in the items list should be selected, or to listen to changes in the selection to know which item has been chosen.
- Parameters:
-
value- the value for theselectionModelproperty - See Also:
getSelectionModel
public final SingleSelectionModel<T> getSelectionModel()
selectionModel property.- Property description:
- The selection model for the ChoiceBox. Only a single choice can be made, hence, the ChoiceBox supports only a SingleSelectionModel. Generally, the main interaction with the selection model is to explicitly set which item in the items list should be selected, or to listen to changes in the selection to know which item has been chosen.
- Returns:
- the value of the
selectionModelproperty - See Also:
selectionModelProperty
public final ObjectProperty<SingleSelectionModel<T>> selectionModelProperty()
- Returns:
- the
selectionModelproperty - See Also:
isShowing
public final boolean isShowing()
showing property.- Property description:
- Indicates whether the drop down is displaying the list of choices to the user. This is a readonly property which should be manipulated by means of the #show and #hide methods.
- Returns:
- the value of the
showingproperty - See Also:
showingProperty
public final ReadOnlyBooleanProperty showingProperty()
- Returns:
- the
showingproperty - See Also:
setItems
public final void setItems(ObservableList<T> value)
items property.- Property description:
- The items to display in the choice box. The selected item (as indicated in the selection model) must always be one of these items.
- Parameters:
-
value- the value for theitemsproperty - See Also:
getItems
public final ObservableList<T> getItems()
items property.- Property description:
- The items to display in the choice box. The selected item (as indicated in the selection model) must always be one of these items.
- Returns:
- the value of the
itemsproperty - See Also:
itemsProperty
public final ObjectProperty<ObservableList<T>> itemsProperty()
- Returns:
- the
itemsproperty - See Also:
converterProperty
public final ObjectProperty<StringConverter<T>> converterProperty()
javafx.util.converter package can be set.- Returns:
- the string converter property
- Since:
- JavaFX 2.1
- See Also:
setConverter
public final void setConverter(StringConverter<T> value)
converter property.- Property description:
- Allows a way to specify how to represent objects in the items list. When a StringConverter is set, the object toString method is not called and instead its toString(object T) is called, passing the objects in the items list. This is useful when using domain objects in a ChoiceBox as this property allows for customization of the representation. Also, any of the pre-built Converters available in the
javafx.util.converterpackage can be set. - Parameters:
-
value- the value for theconverterproperty - Since:
- JavaFX 2.1
- See Also:
getConverter
public final StringConverter<T> getConverter()
converter property.- Property description:
- Allows a way to specify how to represent objects in the items list. When a StringConverter is set, the object toString method is not called and instead its toString(object T) is called, passing the objects in the items list. This is useful when using domain objects in a ChoiceBox as this property allows for customization of the representation. Also, any of the pre-built Converters available in the
javafx.util.converterpackage can be set. - Returns:
- the value of the
converterproperty - Since:
- JavaFX 2.1
- See Also:
valueProperty
public final ObjectProperty<T> valueProperty()
- Returns:
- the value property
- Since:
- JavaFX 2.1
- See Also:
setValue
public final void setValue(T value)
value property.- Property description:
- The value of this ChoiceBox is defined as the selected item in the ChoiceBox selection model. The valueProperty is synchronized with the selectedItem. This property allows for bi-directional binding of external properties to the ChoiceBox and updates the selection model accordingly.
- Parameters:
-
value- the value for thevalueproperty - Since:
- JavaFX 2.1
- See Also:
getValue
public final T getValue()
value property.- Property description:
- The value of this ChoiceBox is defined as the selected item in the ChoiceBox selection model. The valueProperty is synchronized with the selectedItem. This property allows for bi-directional binding of external properties to the ChoiceBox and updates the selection model accordingly.
- Returns:
- the value of the
valueproperty - Since:
- JavaFX 2.1
- See Also:
onActionProperty
public final ObjectProperty<EventHandler<ActionEvent>> onActionProperty()
value property is changed. This may be due to the value property being programmatically changed or when the user selects an item in a popup menu.- Returns:
- the on action property
- Since:
- JavaFX 8u60
- See Also:
setOnAction
public final void setOnAction(EventHandler<ActionEvent> value)
onAction property.- Property description:
- The ChoiceBox action, which is invoked whenever the ChoiceBox
valueproperty is changed. This may be due to the value property being programmatically changed or when the user selects an item in a popup menu. - Parameters:
-
value- the value for theonActionproperty - Since:
- JavaFX 8u60
- See Also:
getOnAction
public final EventHandler<ActionEvent> getOnAction()
onAction property.- Property description:
- The ChoiceBox action, which is invoked whenever the ChoiceBox
valueproperty is changed. This may be due to the value property being programmatically changed or when the user selects an item in a popup menu. - Returns:
- the value of the
onActionproperty - Since:
- JavaFX 8u60
- See Also:
onShowingProperty
public final ObjectProperty<EventHandler<Event>> onShowingProperty()
ChoiceBox popup being shown.- Returns:
- the on showing property
- Since:
- JavaFX 8u60
- See Also:
setOnShowing
public final void setOnShowing(EventHandler<Event> value)
onShowing property.- Property description:
- Called just prior to the
ChoiceBoxpopup being shown. - Parameters:
-
value- the value for theonShowingproperty - Since:
- JavaFX 8u60
- See Also:
getOnShowing
public final EventHandler<Event> getOnShowing()
onShowing property.- Property description:
- Called just prior to the
ChoiceBoxpopup being shown. - Returns:
- the value of the
onShowingproperty - Since:
- JavaFX 8u60
- See Also:
onShownProperty
public final ObjectProperty<EventHandler<Event>> onShownProperty()
ChoiceBox popup is shown.- Returns:
- the on shown property
- Since:
- JavaFX 8u60
- See Also:
setOnShown
public final void setOnShown(EventHandler<Event> value)
onShown property.- Property description:
- Called just after the
ChoiceBoxpopup is shown. - Parameters:
-
value- the value for theonShownproperty - Since:
- JavaFX 8u60
- See Also:
getOnShown
public final EventHandler<Event> getOnShown()
onShown property.- Property description:
- Called just after the
ChoiceBoxpopup is shown. - Returns:
- the value of the
onShownproperty - Since:
- JavaFX 8u60
- See Also:
onHidingProperty
public final ObjectProperty<EventHandler<Event>> onHidingProperty()
ChoiceBox popup being hidden.- Returns:
- the on hiding property
- Since:
- JavaFX 8u60
- See Also:
setOnHiding
public final void setOnHiding(EventHandler<Event> value)
onHiding property.- Property description:
- Called just prior to the
ChoiceBoxpopup being hidden. - Parameters:
-
value- the value for theonHidingproperty - Since:
- JavaFX 8u60
- See Also:
getOnHiding
public final EventHandler<Event> getOnHiding()
onHiding property.- Property description:
- Called just prior to the
ChoiceBoxpopup being hidden. - Returns:
- the value of the
onHidingproperty - Since:
- JavaFX 8u60
- See Also:
onHiddenProperty
public final ObjectProperty<EventHandler<Event>> onHiddenProperty()
ChoiceBox popup has been hidden.- Returns:
- the on hidden property
- Since:
- JavaFX 8u60
- See Also:
setOnHidden
public final void setOnHidden(EventHandler<Event> value)
onHidden property.- Property description:
- Called just after the
ChoiceBoxpopup has been hidden. - Parameters:
-
value- the value for theonHiddenproperty - Since:
- JavaFX 8u60
- See Also:
getOnHidden
public final EventHandler<Event> getOnHidden()
onHidden property.- Property description:
- Called just after the
ChoiceBoxpopup has been hidden. - Returns:
- the value of the
onHiddenproperty - Since:
- JavaFX 8u60
- See Also:
show
public void show()
hide
public void hide()
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.