- java.lang.Object
-
- javafx.scene.Node
-
- javafx.scene.Parent
-
- javafx.scene.layout.Region
-
- javafx.scene.control.Control
-
- javafx.scene.control.ChoiceBox<T>
-
- すべての実装されたインタフェース:
Styleable
,EventTarget
,Skinnable
@DefaultProperty("items") public class ChoiceBox<T> extends Control
ChoiceBoxは、ユーザーに選択可能な比較的小さいセットの事前に定義された選択項目を示すために使用されます。 ChoiceBoxは、表示されている場合、これらの選択項目をユーザーに表示し、ユーザーが厳密に1つ選択できるようにします。 表示されていない場合、現在の選択が表示されます。デフォルトでは、ChoiceBoxには選択されているアイテムはありません(他に指定されている場合を除く)。 ChoiceBoxでは、ユーザーは事前定義済リストからの選択のみ可能ですが、開発者は、事前定義済リストで使用できないアイテムを選択済アイテムとして指定できます。 このことは、いくつかの重要なユースケースで必要となります。
ChoiceBoxの構成は順序非依存です。 アイテムを指定してから選択済アイテムを指定したり、選択済アイテムを指定してからアイテムを指定することができます。 いずれの方法も正常に機能します。
ChoiceBoxアイテムの選択は、
SelectionModel
によって処理されます。ListViewおよびComboBoxと同様、使用されるSelectionModel
を変更できます(ただし、変更されることはほとんどありません)。 ChoiceBoxは、使用されるデフォルトがSingleSelectionModel
であるため、単一選択モデルのみをサポートします。import javafx.scene.control.ChoiceBox; ChoiceBox cb = new ChoiceBox(); cb.getItems().addAll("item1", "item2", "item3");
- 導入されたバージョン:
- JavaFX 2.0
-
-
プロパティのサマリー
プロパティ Type プロパティ 説明 ObjectProperty<StringConverter<T>>
converter
アイテム・リストでオブジェクトを表す方法を指定できるようにします。ObjectProperty<ObservableList<T>>
items
選択ボックスに表示するアイテム。ObjectProperty<EventHandler<ActionEvent>>
onAction
ChoiceBoxアクションは、ChoiceBoxのvalue
プロパティが変更されたときに呼び出されます。ObjectProperty<EventHandler<Event>>
onHidden
ChoiceBox
ポップアップが非表示になった直後に呼び出されます。ObjectProperty<EventHandler<Event>>
onHiding
ChoiceBox
ポップアップを非表示にする直前に呼び出されます。ObjectProperty<EventHandler<Event>>
onShowing
表示されているChoiceBox
ポップアップの直前に呼び出されます。ObjectProperty<EventHandler<Event>>
onShown
ChoiceBox
ポップアップが表示された直後に呼び出されます。ObjectProperty<SingleSelectionModel<T>>
selectionModel
ChoiceBoxの選択モデル。ReadOnlyBooleanProperty
showing
ドロップ・ダウンで選択のリストがユーザーに表示されているかどうかを示します。ObjectProperty<T>
value
このChoiceBoxの値は、ChoiceBox選択モデルの選択項目として定義されます。-
クラス javafx.scene.control.Controlから継承されたプロパティ
contextMenu、skin、tooltip
-
クラスjavafx.scene.Nodeから継承されたプロパティ
accessibleHelp, 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
-
クラス javafx.scene.Parentから継承されたプロパティ
needsLayout
-
クラス javafx.scene.layout.Regionから継承されたプロパティ
background、border、cacheShape、centerShape、height、insets、maxHeight、maxWidth、minHeight、minWidth、opaqueInsets、padding、prefHeight、prefWidth、scaleShape、shape、snapToPixel、width
-
-
フィールドのサマリー
フィールド 修飾子と型 フィールド 説明 static EventType<Event>
ON_HIDDEN
ChoiceBoxポップアップが非表示になったときに呼び出されます。static EventType<Event>
ON_HIDING
ChoiceBoxポップアップwillが非表示になったときに呼び出されます。static EventType<Event>
ON_SHOWING
ChoiceBoxの前に呼び出され、ユーザーがChoiceBoxをクリックしたり操作したりした後でポップアップを表示します。static EventType<Event>
ON_SHOWN
ChoiceBoxがポップアップを表示した後に呼び出されます。-
クラスjavafx.scene.Nodeから継承されたフィールド
BASELINE_OFFSET_SAME_AS_HEIGHT
-
クラス javafx.scene.layout.Regionから継承されたフィールド
USE_COMPUTED_SIZE、USE_PREF_SIZE
-
-
コンストラクタのサマリー
コンストラクタ コンストラクタ 説明 ChoiceBox()
空のアイテム・リストを持つ、新しいChoiceBoxを作成します。ChoiceBox(ObservableList<T> items)
指定されたアイテム・セットを含む新しいChoiceBoxを作成します。
-
メソッドのサマリー
すべてのメソッド インスタンス・メソッド 具象メソッド 修飾子と型 メソッド 説明 ObjectProperty<StringConverter<T>>
converterProperty()
アイテム・リストでオブジェクトを表す方法を指定できるようにします。protected Skin<?>
createDefaultSkin()
このコントロールのデフォルト・スキンの新しいインスタンスを作成します。void
executeAccessibleAction(AccessibleAction action, Object... parameters)
このメソッドは、引数で指定されたアクションの実行をリクエストするためにアシスティブ・テクノロジによって呼び出されます。StringConverter<T>
getConverter()
プロパティconverterの値を取得します。ObservableList<T>
getItems()
プロパティ・アイテムの値を取得します。EventHandler<ActionEvent>
getOnAction()
プロパティonActionの値を取得します。EventHandler<Event>
getOnHidden()
プロパティonHiddenの値を取得します。EventHandler<Event>
getOnHiding()
プロパティonHidingの値を取得します。EventHandler<Event>
getOnShowing()
プロパティonShowingの値を取得します。EventHandler<Event>
getOnShown()
プロパティonShownの値を取得します。SingleSelectionModel<T>
getSelectionModel()
プロパティselectionModelの値を取得します。T
getValue()
プロパティvalueの値を取得します。void
hide()
選択のリストを閉じます。boolean
isShowing()
プロパティshowingの値を取得します。ObjectProperty<ObservableList<T>>
itemsProperty()
選択ボックスに表示するアイテム。ObjectProperty<EventHandler<ActionEvent>>
onActionProperty()
ChoiceBoxアクションは、ChoiceBoxのvalue
プロパティが変更されたときに呼び出されます。ObjectProperty<EventHandler<Event>>
onHiddenProperty()
ChoiceBox
ポップアップが非表示になった直後に呼び出されます。ObjectProperty<EventHandler<Event>>
onHidingProperty()
ChoiceBox
ポップアップを非表示にする直前に呼び出されます。ObjectProperty<EventHandler<Event>>
onShowingProperty()
表示されているChoiceBox
ポップアップの直前に呼び出されます。ObjectProperty<EventHandler<Event>>
onShownProperty()
ChoiceBox
ポップアップが表示された直後に呼び出されます。Object
queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)
このメソッドは、属性の値をリクエストするためにアシスティブ・テクノロジによって呼び出されます。ObjectProperty<SingleSelectionModel<T>>
selectionModelProperty()
ChoiceBoxの選択モデル。void
setConverter(StringConverter<T> value)
プロパティconverterの値を設定します。void
setItems(ObservableList<T> value)
プロパティ・アイテムの値を設定します。void
setOnAction(EventHandler<ActionEvent> value)
プロパティonActionの値を設定します。void
setOnHidden(EventHandler<Event> value)
プロパティonHiddenの値を設定します。void
setOnHiding(EventHandler<Event> value)
プロパティonHidingの値を設定します。void
setOnShowing(EventHandler<Event> value)
プロパティonShowingの値を設定します。void
setOnShown(EventHandler<Event> value)
プロパティonShownの値を設定します。void
setSelectionModel(SingleSelectionModel<T> value)
プロパティselectionModelの値を設定します。void
setValue(T value)
プロパティvalueの値を設定します。void
show()
選択のリストを開きます。ReadOnlyBooleanProperty
showingProperty()
ドロップ・ダウンで選択のリストがユーザーに表示されているかどうかを示します。ObjectProperty<T>
valueProperty()
このChoiceBoxの値は、ChoiceBox選択モデルの選択項目として定義されます。-
クラス javafx.scene.control.Controlから継承されたメソッド
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, getBaselineOffset, getClassCssMetaData, getContextMenu, getControlCssMetaData, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, setContextMenu, setSkin, setTooltip, skinProperty, tooltipProperty
-
クラス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, 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
-
クラス java.lang.Objectから継承されたメソッド
clone、equals、finalize、getClass、hashCode、notify、notifyAll、wait、wait、wait
-
クラス javafx.scene.Parentから継承されたメソッド
getChildren、getChildrenUnmodifiable、getManagedChildren、getStylesheets、isNeedsLayout、layout、lookup、needsLayoutProperty、requestLayout、requestParentLayout、setNeedsLayout、updateBounds
-
クラス javafx.scene.layout.Regionから継承されたメソッド
backgroundProperty, 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
-
インタフェース javafx.css.Styleableから継承されたメソッド
getStyleableNode
-
-
-
-
プロパティの詳細
-
selectionModel
public final ObjectProperty<SingleSelectionModel<T>> selectionModelProperty
ChoiceBoxの選択モデル。 単一の選択のみを行えるため、ChoiceBoxではSingleSelectionModelのみをサポートします。 通常は、選択モデルとの主な対話は、アイテム・リスト内のどのアイテムを選択するかを明示的に設定するか、または選択での変更をリスニングしてどのアイテムが選択されたかを認識することです。
-
showing
public final ReadOnlyBooleanProperty showingProperty
ドロップ・ダウンで選択のリストがユーザーに表示されているかどうかを示します。 これは、#showメソッドおよび#hideメソッドで操作される読取り専用プロパティです。- 関連項目:
isShowing()
-
items
public final ObjectProperty<ObservableList<T>> itemsProperty
選択ボックスに表示するアイテム。 選択されたアイテムは(選択モデルで示されているように)、常に、これらのいずれかのアイテムである必要があります。
-
converter
public ObjectProperty<StringConverter<T>> converterProperty
アイテム・リストでオブジェクトを表す方法を指定できるようにします。 StringConverterが設定されている場合、オブジェクトのtoStringメソッドは呼び出されず、かわりにそのtoString(object T)が呼び出され、アイテム・リスト内のオブジェクトを渡します。 このプロパティでは、表現のカスタマイズが可能であるため、ChoiceBoxのドメイン・オブジェクトの使用時に役立ちます。 また、javafx.util.converter
パッケージで使用可能な、あらかじめ構築されたコンバータを設定することもできます。- 導入されたバージョン:
- JavaFX 2.1
- 関連項目:
getConverter()
、setConverter(StringConverter)
-
value
public ObjectProperty<T> valueProperty
このChoiceBoxの値は、ChoiceBox選択モデルの選択項目として定義されます。 valuePropertyは、selectedItemと同期されます。 このプロパティでは、ChoiceBoxに対する外部プロパティの双方向バインディングが可能で、それに従って選択モデルを更新します。- 導入されたバージョン:
- JavaFX 2.1
- 関連項目:
getValue()
、setValue(T)
-
onAction
public final ObjectProperty<EventHandler<ActionEvent>> onActionProperty
ChoiceBoxアクションは、ChoiceBoxのvalue
プロパティが変更されたときに呼び出されます。 これは、valueプロパティがプログラムによって変更されているか、ユーザーがポップアップ・メニューでアイテムを選択したことが原因である可能性があります。- 導入されたバージョン:
- JavaFX 8u60
- 関連項目:
getOnAction()
、setOnAction(EventHandler)
-
onShowing
public final ObjectProperty<EventHandler<Event>> onShowingProperty
表示されているChoiceBox
ポップアップの直前に呼び出されます。- 導入されたバージョン:
- JavaFX 8u60
- 関連項目:
getOnShowing()
、setOnShowing(EventHandler)
-
onShown
public final ObjectProperty<EventHandler<Event>> onShownProperty
ChoiceBox
ポップアップが表示された直後に呼び出されます。- 導入されたバージョン:
- JavaFX 8u60
- 関連項目:
getOnShown()
、setOnShown(EventHandler)
-
onHiding
public final ObjectProperty<EventHandler<Event>> onHidingProperty
ChoiceBox
ポップアップを非表示にする直前に呼び出されます。- 導入されたバージョン:
- JavaFX 8u60
- 関連項目:
getOnHiding()
、setOnHiding(EventHandler)
-
onHidden
public final ObjectProperty<EventHandler<Event>> onHiddenProperty
ChoiceBox
ポップアップが非表示になった直後に呼び出されます。- 導入されたバージョン:
- JavaFX 8u60
- 関連項目:
getOnHidden()
、setOnHidden(EventHandler)
-
-
フィールドの詳細
-
ON_SHOWING
public static final EventType<Event> ON_SHOWING
ChoiceBoxの前に呼び出され、ユーザーがChoiceBoxをクリックしたり操作したりした後でポップアップを表示します。- 導入されたバージョン:
- JavaFX 8u60
-
ON_SHOWN
public static final EventType<Event> ON_SHOWN
ChoiceBoxがポップアップを表示した後に呼び出されます。- 導入されたバージョン:
- JavaFX 8u60
-
ON_HIDING
public static final EventType<Event> ON_HIDING
ChoiceBoxポップアップwillが非表示になったときに呼び出されます。- 導入されたバージョン:
- JavaFX 8u60
-
-
コンストラクタの詳細
-
ChoiceBox
public ChoiceBox()
空のアイテム・リストを持つ、新しいChoiceBoxを作成します。
-
ChoiceBox
public ChoiceBox(ObservableList<T> items)
指定されたアイテム・セットを含む新しいChoiceBoxを作成します。 監視可能であるため、このリストのコンテンツが時間の経過に伴って変更されると、ChoiceBoxはそれに従って更新されます。- パラメータ:
items
- アイテムのセット
-
-
メソッドの詳細
-
setSelectionModel
public final void setSelectionModel(SingleSelectionModel<T> value)
プロパティselectionModelの値を設定します。- プロパティの説明:
- ChoiceBoxの選択モデル。 単一の選択のみを行えるため、ChoiceBoxではSingleSelectionModelのみをサポートします。 通常は、選択モデルとの主な対話は、アイテム・リスト内のどのアイテムを選択するかを明示的に設定するか、または選択での変更をリスニングしてどのアイテムが選択されたかを認識することです。
-
getSelectionModel
public final SingleSelectionModel<T> getSelectionModel()
プロパティselectionModelの値を取得します。- プロパティの説明:
- ChoiceBoxの選択モデル。 単一の選択のみを行えるため、ChoiceBoxではSingleSelectionModelのみをサポートします。 通常は、選択モデルとの主な対話は、アイテム・リスト内のどのアイテムを選択するかを明示的に設定するか、または選択での変更をリスニングしてどのアイテムが選択されたかを認識することです。
-
selectionModelProperty
public final ObjectProperty<SingleSelectionModel<T>> selectionModelProperty()
ChoiceBoxの選択モデル。 単一の選択のみを行えるため、ChoiceBoxではSingleSelectionModelのみをサポートします。 通常は、選択モデルとの主な対話は、アイテム・リスト内のどのアイテムを選択するかを明示的に設定するか、または選択での変更をリスニングしてどのアイテムが選択されたかを認識することです。
-
isShowing
public final boolean isShowing()
プロパティshowingの値を取得します。- プロパティの説明:
- ドロップ・ダウンで選択のリストがユーザーに表示されているかどうかを示します。 これは、#showメソッドおよび#hideメソッドで操作される読取り専用プロパティです。
-
showingProperty
public final ReadOnlyBooleanProperty showingProperty()
ドロップ・ダウンで選択のリストがユーザーに表示されているかどうかを示します。 これは、#showメソッドおよび#hideメソッドで操作される読取り専用プロパティです。- 関連項目:
isShowing()
-
setItems
public final void setItems(ObservableList<T> value)
プロパティ・アイテムの値を設定します。- プロパティの説明:
- 選択ボックスに表示するアイテム。 選択されたアイテムは(選択モデルで示されているように)、常に、これらのいずれかのアイテムである必要があります。
-
getItems
public final ObservableList<T> getItems()
プロパティ・アイテムの値を取得します。- プロパティの説明:
- 選択ボックスに表示するアイテム。 選択されたアイテムは(選択モデルで示されているように)、常に、これらのいずれかのアイテムである必要があります。
-
itemsProperty
public final ObjectProperty<ObservableList<T>> itemsProperty()
選択ボックスに表示するアイテム。 選択されたアイテムは(選択モデルで示されているように)、常に、これらのいずれかのアイテムである必要があります。
-
converterProperty
public ObjectProperty<StringConverter<T>> converterProperty()
アイテム・リストでオブジェクトを表す方法を指定できるようにします。 StringConverterが設定されている場合、オブジェクトのtoStringメソッドは呼び出されず、かわりにそのtoString(object T)が呼び出され、アイテム・リスト内のオブジェクトを渡します。 このプロパティでは、表現のカスタマイズが可能であるため、ChoiceBoxのドメイン・オブジェクトの使用時に役立ちます。 また、javafx.util.converter
パッケージで使用可能な、あらかじめ構築されたコンバータを設定することもできます。- 導入されたバージョン:
- JavaFX 2.1
- 関連項目:
getConverter()
、setConverter(StringConverter)
-
setConverter
public final void setConverter(StringConverter<T> value)
プロパティconverterの値を設定します。- プロパティの説明:
- アイテム・リストでオブジェクトを表す方法を指定できるようにします。 StringConverterが設定されている場合、オブジェクトのtoStringメソッドは呼び出されず、かわりにそのtoString(object T)が呼び出され、アイテム・リスト内のオブジェクトを渡します。 このプロパティでは、表現のカスタマイズが可能であるため、ChoiceBoxのドメイン・オブジェクトの使用時に役立ちます。 また、
javafx.util.converter
パッケージで使用可能な、あらかじめ構築されたコンバータを設定することもできます。 - 導入されたバージョン:
- JavaFX 2.1
-
getConverter
public final StringConverter<T> getConverter()
プロパティconverterの値を取得します。- プロパティの説明:
- アイテム・リストでオブジェクトを表す方法を指定できるようにします。 StringConverterが設定されている場合、オブジェクトのtoStringメソッドは呼び出されず、かわりにそのtoString(object T)が呼び出され、アイテム・リスト内のオブジェクトを渡します。 このプロパティでは、表現のカスタマイズが可能であるため、ChoiceBoxのドメイン・オブジェクトの使用時に役立ちます。 また、
javafx.util.converter
パッケージで使用可能な、あらかじめ構築されたコンバータを設定することもできます。 - 導入されたバージョン:
- JavaFX 2.1
-
valueProperty
public ObjectProperty<T> valueProperty()
このChoiceBoxの値は、ChoiceBox選択モデルの選択項目として定義されます。 valuePropertyは、selectedItemと同期されます。 このプロパティでは、ChoiceBoxに対する外部プロパティの双方向バインディングが可能で、それに従って選択モデルを更新します。- 導入されたバージョン:
- JavaFX 2.1
- 関連項目:
getValue()
、setValue(T)
-
setValue
public final void setValue(T value)
プロパティvalueの値を設定します。- プロパティの説明:
- このChoiceBoxの値は、ChoiceBox選択モデルの選択項目として定義されます。 valuePropertyは、selectedItemと同期されます。 このプロパティでは、ChoiceBoxに対する外部プロパティの双方向バインディングが可能で、それに従って選択モデルを更新します。
- 導入されたバージョン:
- JavaFX 2.1
-
getValue
public final T getValue()
プロパティvalueの値を取得します。- プロパティの説明:
- このChoiceBoxの値は、ChoiceBox選択モデルの選択項目として定義されます。 valuePropertyは、selectedItemと同期されます。 このプロパティでは、ChoiceBoxに対する外部プロパティの双方向バインディングが可能で、それに従って選択モデルを更新します。
- 導入されたバージョン:
- JavaFX 2.1
-
onActionProperty
public final ObjectProperty<EventHandler<ActionEvent>> onActionProperty()
ChoiceBoxアクションは、ChoiceBoxのvalue
プロパティが変更されたときに呼び出されます。 これは、valueプロパティがプログラムによって変更されているか、ユーザーがポップアップ・メニューでアイテムを選択したことが原因である可能性があります。- 導入されたバージョン:
- JavaFX 8u60
- 関連項目:
getOnAction()
、setOnAction(EventHandler)
-
setOnAction
public final void setOnAction(EventHandler<ActionEvent> value)
プロパティonActionの値を設定します。- プロパティの説明:
- ChoiceBoxアクションは、ChoiceBoxの
value
プロパティが変更されたときに呼び出されます。 これは、valueプロパティがプログラムによって変更されているか、ユーザーがポップアップ・メニューでアイテムを選択したことが原因である可能性があります。 - 導入されたバージョン:
- JavaFX 8u60
-
getOnAction
public final EventHandler<ActionEvent> getOnAction()
プロパティonActionの値を取得します。- プロパティの説明:
- ChoiceBoxアクションは、ChoiceBoxの
value
プロパティが変更されたときに呼び出されます。 これは、valueプロパティがプログラムによって変更されているか、ユーザーがポップアップ・メニューでアイテムを選択したことが原因である可能性があります。 - 導入されたバージョン:
- JavaFX 8u60
-
onShowingProperty
public final ObjectProperty<EventHandler<Event>> onShowingProperty()
表示されているChoiceBox
ポップアップの直前に呼び出されます。- 導入されたバージョン:
- JavaFX 8u60
- 関連項目:
getOnShowing()
、setOnShowing(EventHandler)
-
setOnShowing
public final void setOnShowing(EventHandler<Event> value)
プロパティonShowingの値を設定します。- プロパティの説明:
- 表示されている
ChoiceBox
ポップアップの直前に呼び出されます。 - 導入されたバージョン:
- JavaFX 8u60
-
getOnShowing
public final EventHandler<Event> getOnShowing()
プロパティonShowingの値を取得します。- プロパティの説明:
- 表示されている
ChoiceBox
ポップアップの直前に呼び出されます。 - 導入されたバージョン:
- JavaFX 8u60
-
onShownProperty
public final ObjectProperty<EventHandler<Event>> onShownProperty()
ChoiceBox
ポップアップが表示された直後に呼び出されます。- 導入されたバージョン:
- JavaFX 8u60
- 関連項目:
getOnShown()
、setOnShown(EventHandler)
-
setOnShown
public final void setOnShown(EventHandler<Event> value)
プロパティonShownの値を設定します。- プロパティの説明:
ChoiceBox
ポップアップが表示された直後に呼び出されます。- 導入されたバージョン:
- JavaFX 8u60
-
getOnShown
public final EventHandler<Event> getOnShown()
プロパティonShownの値を取得します。- プロパティの説明:
ChoiceBox
ポップアップが表示された直後に呼び出されます。- 導入されたバージョン:
- JavaFX 8u60
-
onHidingProperty
public final ObjectProperty<EventHandler<Event>> onHidingProperty()
ChoiceBox
ポップアップを非表示にする直前に呼び出されます。- 導入されたバージョン:
- JavaFX 8u60
- 関連項目:
getOnHiding()
、setOnHiding(EventHandler)
-
setOnHiding
public final void setOnHiding(EventHandler<Event> value)
プロパティonHidingの値を設定します。- プロパティの説明:
ChoiceBox
ポップアップを非表示にする直前に呼び出されます。- 導入されたバージョン:
- JavaFX 8u60
-
getOnHiding
public final EventHandler<Event> getOnHiding()
プロパティonHidingの値を取得します。- プロパティの説明:
ChoiceBox
ポップアップを非表示にする直前に呼び出されます。- 導入されたバージョン:
- JavaFX 8u60
-
onHiddenProperty
public final ObjectProperty<EventHandler<Event>> onHiddenProperty()
ChoiceBox
ポップアップが非表示になった直後に呼び出されます。- 導入されたバージョン:
- JavaFX 8u60
- 関連項目:
getOnHidden()
、setOnHidden(EventHandler)
-
setOnHidden
public final void setOnHidden(EventHandler<Event> value)
プロパティonHiddenの値を設定します。- プロパティの説明:
ChoiceBox
ポップアップが非表示になった直後に呼び出されます。- 導入されたバージョン:
- JavaFX 8u60
-
getOnHidden
public final EventHandler<Event> getOnHidden()
プロパティonHiddenの値を取得します。- プロパティの説明:
ChoiceBox
ポップアップが非表示になった直後に呼び出されます。- 導入されたバージョン:
- JavaFX 8u60
-
show
public void show()
選択のリストを開きます。
-
hide
public void hide()
選択のリストを閉じます。
-
createDefaultSkin
protected Skin<?> createDefaultSkin()
このコントロールのデフォルト・スキンの新しいインスタンスを作成します。 これは、CSS-fx-skin
を介してスキンが提供されていない場合にコントロール用のスキンを作成するために、またはsetSkin(...)
を使用してサブクラスで明示的に設定するために呼び出されます。- オーバーライド:
createDefaultSkin
、クラス:Control
- 戻り値:
- このコントロールのデフォルト・スキンの新しいインスタンス。 nullの場合、コントロールにはスキンがありません(Cssで提供されている場合を除く)。
-
queryAccessibleAttribute
public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)
このメソッドは、属性の値をリクエストするためにアシスティブ・テクノロジによって呼び出されます。このメソッドは一般に、特定の役割に必要な属性を実装するためにサブクラスによってオーバーライドされます。
特定の属性が処理されない場合は、スーパークラスの実装を呼び出す必要があります。- オーバーライド:
queryAccessibleAttribute
、クラス:Control
- パラメータ:
attribute
- リクエストされた属性parameters
- オプションのパラメータ・リスト- 戻り値:
- リクエストされた属性の値
- 関連項目:
AccessibleAttribute
-
executeAccessibleAction
public void executeAccessibleAction(AccessibleAction action, Object... parameters)
このメソッドは、引数で指定されたアクションの実行をリクエストするためにアシスティブ・テクノロジによって呼び出されます。このメソッドは一般に、特定の役割に必要なアクションを実装するためにサブクラスによってオーバーライドされます。
特定のアクションが処理されない場合は、スーパークラスの実装を呼び出す必要があります。- オーバーライド:
executeAccessibleAction
、クラス:Control
- パラメータ:
action
- 実行するアクションparameters
- オプションのパラメータ・リスト- 関連項目:
「AccessibleAction」
-
-