< prev index next >
modules/javafx.controls/src/main/java/javafx/scene/control/ChoiceBox.java
Print this page
*** 135,145 ****
/**
* 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.
! * @param items
*/
public ChoiceBox(ObservableList<T> items) {
getStyleClass().setAll("choice-box");
setAccessibleRole(AccessibleRole.COMBO_BOX);
setItems(items);
--- 135,145 ----
/**
* 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.
! * @param items the set of items
*/
public ChoiceBox(ObservableList<T> items) {
getStyleClass().setAll("choice-box");
setAccessibleRole(AccessibleRole.COMBO_BOX);
setItems(items);
*** 306,315 ****
--- 306,316 ----
* 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 {@link javafx.util.converter} package can be set.
+ * @return the string converter property
* @since JavaFX 2.1
*/
public ObjectProperty<StringConverter<T>> converterProperty() { return converter; }
private ObjectProperty<StringConverter<T>> converter =
new SimpleObjectProperty<StringConverter<T>>(this, "converter", null);
*** 319,328 ****
--- 320,330 ----
/**
* 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.
+ * @return the value property
* @since JavaFX 2.1
*/
public ObjectProperty<T> valueProperty() { return value; }
private ObjectProperty<T> value = new SimpleObjectProperty<T>(this, "value") {
@Override protected void invalidated() {
*** 345,354 ****
--- 347,357 ----
* The ChoiceBox action, which is invoked whenever the ChoiceBox
* {@link #valueProperty() 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.
*
+ * @return the on action property
* @since JavaFX 8u60
*/
public final ObjectProperty<EventHandler<ActionEvent>> onActionProperty() { return onAction; }
public final void setOnAction(EventHandler<ActionEvent> value) { onActionProperty().set(value); }
public final EventHandler<ActionEvent> getOnAction() { return onActionProperty().get(); }
*** 370,379 ****
--- 373,383 ----
// --- On Showing
/**
* Called just prior to the {@code ChoiceBox} popup being shown.
+ * @return the on showing property
* @since JavaFX 8u60
*/
public final ObjectProperty<EventHandler<Event>> onShowingProperty() { return onShowing; }
public final void setOnShowing(EventHandler<Event> value) { onShowingProperty().set(value); }
public final EventHandler<Event> getOnShowing() { return onShowingProperty().get(); }
*** 393,402 ****
--- 397,407 ----
// -- On Shown
/**
* Called just after the {@link ChoiceBox} popup is shown.
+ * @return the on shown property
* @since JavaFX 8u60
*/
public final ObjectProperty<EventHandler<Event>> onShownProperty() { return onShown; }
public final void setOnShown(EventHandler<Event> value) { onShownProperty().set(value); }
public final EventHandler<Event> getOnShown() { return onShownProperty().get(); }
*** 416,425 ****
--- 421,431 ----
// --- On Hiding
/**
* Called just prior to the {@link ChoiceBox} popup being hidden.
+ * @return the on hiding property
* @since JavaFX 8u60
*/
public final ObjectProperty<EventHandler<Event>> onHidingProperty() { return onHiding; }
public final void setOnHiding(EventHandler<Event> value) { onHidingProperty().set(value); }
public final EventHandler<Event> getOnHiding() { return onHidingProperty().get(); }
*** 439,448 ****
--- 445,455 ----
// --- On Hidden
/**
* Called just after the {@link ChoiceBox} popup has been hidden.
+ * @return the on hidden property
* @since JavaFX 8u60
*/
public final ObjectProperty<EventHandler<Event>> onHiddenProperty() { return onHidden; }
public final void setOnHidden(EventHandler<Event> value) { onHiddenProperty().set(value); }
public final EventHandler<Event> getOnHidden() { return onHiddenProperty().get(); }
< prev index next >