- java.lang.Object
- 
- javafx.scene.Node
- 
- javafx.scene.Parent
- 
- javafx.scene.layout.Region
- 
- javafx.scene.control.Control
- 
- javafx.scene.control.ChoiceBox<T>
 
 
 
 
 
- 
- All Implemented Interfaces:
- Styleable,- EventTarget,- Skinnable
 
 @DefaultProperty("items") public class ChoiceBox<T> extends Control The ChoiceBox is used for presenting the user with a relatively small set of predefined choices from which they may choose. The ChoiceBox, when "showing", will display to the user these choices and allow them to pick exactly one choice. When not showing, the current choice is displayed.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 theSelectionModelthat is used, although this is likely to be rarely changed. ChoiceBox supports only a single selection model, hence the default used is aSingleSelectionModel.Example: ChoiceBox cb = new ChoiceBox(); cb.getItems().addAll("item1", "item2", "item3"); - Since:
- JavaFX 2.0
 
- 
- 
Property SummaryProperties Type Property Description ObjectProperty<StringConverter<T>>converterAllows a way to specify how to represent objects in the items list.ObjectProperty<ObservableList<T>>itemsThe items to display in the choice box.ObjectProperty<EventHandler<ActionEvent>>onActionThe ChoiceBox action, which is invoked whenever the ChoiceBoxvalueproperty is changed.ObjectProperty<EventHandler<Event>>onHiddenCalled just after theChoiceBoxpopup has been hidden.ObjectProperty<EventHandler<Event>>onHidingCalled just prior to theChoiceBoxpopup being hidden.ObjectProperty<EventHandler<Event>>onShowingCalled just prior to theChoiceBoxpopup being shown.ObjectProperty<EventHandler<Event>>onShownCalled just after theChoiceBoxpopup is shown.ObjectProperty<SingleSelectionModel<T>>selectionModelThe selection model for the ChoiceBox.ReadOnlyBooleanPropertyshowingIndicates whether the drop down is displaying the list of choices to the user.ObjectProperty<T>valueThe value of this ChoiceBox is defined as the selected item in the ChoiceBox selection model.- 
Properties inherited from class javafx.scene.control.ControlcontextMenu, skin, tooltip
 - 
Properties inherited from class javafx.scene.layout.Regionbackground, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width
 - 
Properties inherited from class javafx.scene.ParentneedsLayout
 - 
Properties inherited from class javafx.scene.NodeaccessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, 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 SummaryFields Modifier and Type Field Description static EventType<Event>ON_HIDDENCalled when the ChoiceBox popup has been hidden.static EventType<Event>ON_HIDINGCalled when the ChoiceBox popup will be hidden.static EventType<Event>ON_SHOWINGCalled prior to the ChoiceBox showing its popup after the user has clicked or otherwise interacted with the ChoiceBox.static EventType<Event>ON_SHOWNCalled after the ChoiceBox has shown its popup.- 
Fields inherited from class javafx.scene.layout.RegionUSE_COMPUTED_SIZE, USE_PREF_SIZE
 - 
Fields inherited from class javafx.scene.NodeBASELINE_OFFSET_SAME_AS_HEIGHT
 
- 
 - 
Constructor SummaryConstructors Constructor Description ChoiceBox()Create a new ChoiceBox which has an empty list of items.ChoiceBox(ObservableList<T> items)Create a new ChoiceBox with the given set of items.
 - 
Method SummaryModifier and Type Method Description ObjectProperty<StringConverter<T>>converterProperty()Allows a way to specify how to represent objects in the items list.protected Skin<?>createDefaultSkin()Create a new instance of the default skin for this control.voidexecuteAccessibleAction(AccessibleAction action, Object... parameters)This method is called by the assistive technology to request the action indicated by the argument should be executed.StringConverter<T>getConverter()Gets the value of the property converter.ObservableList<T>getItems()Gets the value of the property items.EventHandler<ActionEvent>getOnAction()Gets the value of the property onAction.EventHandler<Event>getOnHidden()Gets the value of the property onHidden.EventHandler<Event>getOnHiding()Gets the value of the property onHiding.EventHandler<Event>getOnShowing()Gets the value of the property onShowing.EventHandler<Event>getOnShown()Gets the value of the property onShown.SingleSelectionModel<T>getSelectionModel()Gets the value of the property selectionModel.TgetValue()Gets the value of the property value.voidhide()Closes the list of choices.booleanisShowing()Gets the value of the property showing.ObjectProperty<ObservableList<T>>itemsProperty()The items to display in the choice box.ObjectProperty<EventHandler<ActionEvent>>onActionProperty()The ChoiceBox action, which is invoked whenever the ChoiceBoxvalueproperty is changed.ObjectProperty<EventHandler<Event>>onHiddenProperty()Called just after theChoiceBoxpopup has been hidden.ObjectProperty<EventHandler<Event>>onHidingProperty()Called just prior to theChoiceBoxpopup being hidden.ObjectProperty<EventHandler<Event>>onShowingProperty()Called just prior to theChoiceBoxpopup being shown.ObjectProperty<EventHandler<Event>>onShownProperty()Called just after theChoiceBoxpopup is shown.ObjectqueryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)This method is called by the assistive technology to request the value for an attribute.ObjectProperty<SingleSelectionModel<T>>selectionModelProperty()The selection model for the ChoiceBox.voidsetConverter(StringConverter<T> value)Sets the value of the property converter.voidsetItems(ObservableList<T> value)Sets the value of the property items.voidsetOnAction(EventHandler<ActionEvent> value)Sets the value of the property onAction.voidsetOnHidden(EventHandler<Event> value)Sets the value of the property onHidden.voidsetOnHiding(EventHandler<Event> value)Sets the value of the property onHiding.voidsetOnShowing(EventHandler<Event> value)Sets the value of the property onShowing.voidsetOnShown(EventHandler<Event> value)Sets the value of the property onShown.voidsetSelectionModel(SingleSelectionModel<T> value)Sets the value of the property selectionModel.voidsetValue(T value)Sets the value of the property value.voidshow()Opens the list of choices.ReadOnlyBooleanPropertyshowingProperty()Indicates whether the drop down is displaying the list of choices to the user.ObjectProperty<T>valueProperty()The value of this ChoiceBox is defined as the selected item in the ChoiceBox selection model.- 
Methods inherited from class javafx.scene.control.ControlcomputeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, getBaselineOffset, getClassCssMetaData, getContextMenu, getControlCssMetaData, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, setContextMenu, setSkin, setTooltip, skinProperty, tooltipProperty
 - 
Methods inherited from class javafx.scene.layout.RegionbackgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, 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 inherited from class javafx.scene.ParentgetChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
 - 
Methods inherited from class javafx.scene.NodeaccessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, 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, 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, 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, relocate, removeEventFilter, removeEventHandler, requestFocus, 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 inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface javafx.css.StyleablegetStyleableNode
 
- 
 
- 
- 
- 
Property Detail- 
selectionModelpublic final ObjectProperty<SingleSelectionModel<T>> selectionModelProperty 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.
 - 
showingpublic final ReadOnlyBooleanProperty showingProperty 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.- See Also:
- isShowing()
 
 - 
itemspublic final ObjectProperty<ObservableList<T>> itemsProperty The items to display in the choice box. The selected item (as indicated in the selection model) must always be one of these items.- See Also:
- getItems(),- setItems(ObservableList)
 
 - 
converterpublic ObjectProperty<StringConverter<T>> converterProperty 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 thejavafx.util.converterpackage can be set.- Since:
- JavaFX 2.1
- See Also:
- getConverter(),- setConverter(StringConverter)
 
 - 
valuepublic ObjectProperty<T> valueProperty 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.- Since:
- JavaFX 2.1
- See Also:
- getValue(),- setValue(T)
 
 - 
onActionpublic final ObjectProperty<EventHandler<ActionEvent>> onActionProperty The ChoiceBox action, which is invoked whenever the ChoiceBoxvalueproperty 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:
- getOnAction(),- setOnAction(EventHandler)
 
 - 
onShowingpublic final ObjectProperty<EventHandler<Event>> onShowingProperty Called just prior to theChoiceBoxpopup being shown.- Since:
- JavaFX 8u60
- See Also:
- getOnShowing(),- setOnShowing(EventHandler)
 
 - 
onShownpublic final ObjectProperty<EventHandler<Event>> onShownProperty Called just after theChoiceBoxpopup is shown.- Since:
- JavaFX 8u60
- See Also:
- getOnShown(),- setOnShown(EventHandler)
 
 - 
onHidingpublic final ObjectProperty<EventHandler<Event>> onHidingProperty Called just prior to theChoiceBoxpopup being hidden.- Since:
- JavaFX 8u60
- See Also:
- getOnHiding(),- setOnHiding(EventHandler)
 
 - 
onHiddenpublic final ObjectProperty<EventHandler<Event>> onHiddenProperty Called just after theChoiceBoxpopup has been hidden.- Since:
- JavaFX 8u60
- See Also:
- getOnHidden(),- setOnHidden(EventHandler)
 
 
- 
 - 
Field Detail- 
ON_SHOWINGpublic static final EventType<Event> ON_SHOWING Called prior to the ChoiceBox showing its popup after the user has clicked or otherwise interacted with the ChoiceBox.- Since:
- JavaFX 8u60
 
 - 
ON_SHOWNpublic static final EventType<Event> ON_SHOWN Called after the ChoiceBox has shown its popup.- Since:
- JavaFX 8u60
 
 - 
ON_HIDINGpublic static final EventType<Event> ON_HIDING Called when the ChoiceBox popup will be hidden.- Since:
- JavaFX 8u60
 
 
- 
 - 
Constructor Detail- 
ChoiceBoxpublic ChoiceBox() Create a new ChoiceBox which has an empty list of items.
 - 
ChoiceBoxpublic ChoiceBox(ObservableList<T> items) Create a new ChoiceBox with the given set of items. Since it is observable, the content of this list may change over time and the ChoiceBox will be updated accordingly.- Parameters:
- items- the set of items
 
 
- 
 - 
Method Detail- 
setSelectionModelpublic final void setSelectionModel(SingleSelectionModel<T> value) Sets the value of the property selectionModel.- 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.
 
 - 
getSelectionModelpublic final SingleSelectionModel<T> getSelectionModel() Gets the value of the property selectionModel.- 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.
 
 - 
selectionModelPropertypublic final ObjectProperty<SingleSelectionModel<T>> selectionModelProperty() 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.
 - 
isShowingpublic final boolean isShowing() Gets the value of the property showing.- 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.
 
 - 
showingPropertypublic final ReadOnlyBooleanProperty showingProperty() 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.- See Also:
- isShowing()
 
 - 
setItemspublic final void setItems(ObservableList<T> value) Sets the value of the property items.- 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.
 
 - 
getItemspublic final ObservableList<T> getItems() Gets the value of the property items.- 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.
 
 - 
itemsPropertypublic final ObjectProperty<ObservableList<T>> itemsProperty() The items to display in the choice box. The selected item (as indicated in the selection model) must always be one of these items.- See Also:
- getItems(),- setItems(ObservableList)
 
 - 
converterPropertypublic ObjectProperty<StringConverter<T>> converterProperty() 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 thejavafx.util.converterpackage can be set.- Since:
- JavaFX 2.1
- See Also:
- getConverter(),- setConverter(StringConverter)
 
 - 
setConverterpublic final void setConverter(StringConverter<T> value) Sets the value of the property converter.- 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.
- Since:
- JavaFX 2.1
 
 - 
getConverterpublic final StringConverter<T> getConverter() Gets the value of the property converter.- 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.
- Since:
- JavaFX 2.1
 
 - 
valuePropertypublic ObjectProperty<T> valueProperty() 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.- Since:
- JavaFX 2.1
- See Also:
- getValue(),- setValue(T)
 
 - 
setValuepublic final void setValue(T value) Sets the value of the property value.- 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.
- Since:
- JavaFX 2.1
 
 - 
getValuepublic final T getValue() Gets the value of the property value.- 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.
- Since:
- JavaFX 2.1
 
 - 
onActionPropertypublic final ObjectProperty<EventHandler<ActionEvent>> onActionProperty() The ChoiceBox action, which is invoked whenever the ChoiceBoxvalueproperty 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:
- getOnAction(),- setOnAction(EventHandler)
 
 - 
setOnActionpublic final void setOnAction(EventHandler<ActionEvent> value) Sets the value of the property onAction.- 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.
- Since:
- JavaFX 8u60
 
 - 
getOnActionpublic final EventHandler<ActionEvent> getOnAction() Gets the value of the property onAction.- 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.
- Since:
- JavaFX 8u60
 
 - 
onShowingPropertypublic final ObjectProperty<EventHandler<Event>> onShowingProperty() Called just prior to theChoiceBoxpopup being shown.- Since:
- JavaFX 8u60
- See Also:
- getOnShowing(),- setOnShowing(EventHandler)
 
 - 
setOnShowingpublic final void setOnShowing(EventHandler<Event> value) Sets the value of the property onShowing.- Property description:
- Called just prior to the ChoiceBoxpopup being shown.
- Since:
- JavaFX 8u60
 
 - 
getOnShowingpublic final EventHandler<Event> getOnShowing() Gets the value of the property onShowing.- Property description:
- Called just prior to the ChoiceBoxpopup being shown.
- Since:
- JavaFX 8u60
 
 - 
onShownPropertypublic final ObjectProperty<EventHandler<Event>> onShownProperty() Called just after theChoiceBoxpopup is shown.- Since:
- JavaFX 8u60
- See Also:
- getOnShown(),- setOnShown(EventHandler)
 
 - 
setOnShownpublic final void setOnShown(EventHandler<Event> value) Sets the value of the property onShown.- Property description:
- Called just after the ChoiceBoxpopup is shown.
- Since:
- JavaFX 8u60
 
 - 
getOnShownpublic final EventHandler<Event> getOnShown() Gets the value of the property onShown.- Property description:
- Called just after the ChoiceBoxpopup is shown.
- Since:
- JavaFX 8u60
 
 - 
onHidingPropertypublic final ObjectProperty<EventHandler<Event>> onHidingProperty() Called just prior to theChoiceBoxpopup being hidden.- Since:
- JavaFX 8u60
- See Also:
- getOnHiding(),- setOnHiding(EventHandler)
 
 - 
setOnHidingpublic final void setOnHiding(EventHandler<Event> value) Sets the value of the property onHiding.- Property description:
- Called just prior to the ChoiceBoxpopup being hidden.
- Since:
- JavaFX 8u60
 
 - 
getOnHidingpublic final EventHandler<Event> getOnHiding() Gets the value of the property onHiding.- Property description:
- Called just prior to the ChoiceBoxpopup being hidden.
- Since:
- JavaFX 8u60
 
 - 
onHiddenPropertypublic final ObjectProperty<EventHandler<Event>> onHiddenProperty() Called just after theChoiceBoxpopup has been hidden.- Since:
- JavaFX 8u60
- See Also:
- getOnHidden(),- setOnHidden(EventHandler)
 
 - 
setOnHiddenpublic final void setOnHidden(EventHandler<Event> value) Sets the value of the property onHidden.- Property description:
- Called just after the ChoiceBoxpopup has been hidden.
- Since:
- JavaFX 8u60
 
 - 
getOnHiddenpublic final EventHandler<Event> getOnHidden() Gets the value of the property onHidden.- Property description:
- Called just after the ChoiceBoxpopup has been hidden.
- Since:
- JavaFX 8u60
 
 - 
showpublic void show() Opens the list of choices.
 - 
hidepublic void hide() Closes the list of choices.
 - 
createDefaultSkinprotected Skin<?> createDefaultSkin() Create a new instance of the default skin for this control. This is called to create a skin for the control if no skin is provided via CSS-fx-skinor set explicitly in a sub-class withsetSkin(...).- Overrides:
- createDefaultSkinin class- Control
- Returns:
- new instance of default skin for this control. If null then the control will have no skin unless one is provided by css.
 
 - 
queryAccessibleAttributepublic Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters) 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. 
 If a particular attribute is not handled, the superclass implementation must be called.- Overrides:
- queryAccessibleAttributein class- Control
- Parameters:
- attribute- the requested attribute
- parameters- optional list of parameters
- Returns:
- the value for the requested attribute
- See Also:
- AccessibleAttribute
 
 - 
executeAccessibleActionpublic void executeAccessibleAction(AccessibleAction action, Object... parameters) 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. 
 If a particular action is not handled, the superclass implementation must be called.- Overrides:
- executeAccessibleActionin class- Control
- Parameters:
- action- the action to execute
- parameters- optional list of parameters
- See Also:
- AccessibleAction
 
 
- 
 
-