T - ユーザーに表示するアイテムのタイプ、およびダイアログが閉じられたときにDialog.getResult()を介して返されるタイプ。public class ChoiceDialog<T> extends Dialog<T>
Dialog| Type | プロパティと説明 |
|---|---|
ReadOnlyObjectProperty<T> |
selectedItem
ダイアログで現在選択されているアイテムを表すプロパティを返します。
|
contentText, dialogPane, graphic, headerText, height, onCloseRequest, onHidden, onHiding, onShowing, onShown, resizable, resultConverter, result, showing, title, width, x, y| コンストラクタと説明 |
|---|
ChoiceDialog()
アイテムを設定せず、デフォルト選択肢のnullを使用して、ChoiceDialogのデフォルトの空インスタンスを作成します。
|
ChoiceDialog(T defaultChoice, Collection<T> choices)
最初の引数でユーザーに表示するデフォルトの選択肢を指定し、2番目の引数でユーザーに使用可能なすべて選択肢の集合を指定して、新しいChoiceDialogインスタンスを作成します。
|
ChoiceDialog(T defaultChoice, T... choices)
最初の引数でユーザーに表示するデフォルトの選択肢を指定し、後続のすべての引数をユーザーに使用可能なすべての選択肢の可変引数配列とみなして、新しいChoiceDialogインスタンスを作成します。
|
| 修飾子と型 | メソッドと説明 |
|---|---|
T |
getDefaultChoice()
コンストラクタ内で指定されたデフォルトの選択肢を返します。
|
ObservableList<T> |
getItems()
ユーザーに表示されるすべてのアイテムのリストを返します。
|
T |
getSelectedItem()
ダイアログで現在選択されているアイテムを返します。
|
ReadOnlyObjectProperty<T> |
selectedItemProperty()
ダイアログで現在選択されているアイテムを表すプロパティを返します。
|
void |
setSelectedItem(T item)
ダイアログで現在選択されているアイテムを設定します。
|
buildEventDispatchChain, close, contentTextProperty, dialogPaneProperty, getContentText, getDialogPane, getGraphic, getHeaderText, getHeight, getModality, getOnCloseRequest, getOnHidden, getOnHiding, getOnShowing, getOnShown, getOwner, getResult, getResultConverter, getTitle, getWidth, getX, getY, graphicProperty, headerTextProperty, heightProperty, hide, initModality, initOwner, initStyle, isResizable, isShowing, onCloseRequestProperty, onHiddenProperty, onHidingProperty, onShowingProperty, onShownProperty, resizableProperty, resultConverterProperty, resultProperty, setContentText, setDialogPane, setGraphic, setHeaderText, setHeight, setOnCloseRequest, setOnHidden, setOnHiding, setOnShowing, setOnShown, setResizable, setResult, setResultConverter, setTitle, setWidth, setX, setY, show, showAndWait, showingProperty, titleProperty, widthProperty, xProperty, yPropertypublic final ReadOnlyObjectProperty<T> selectedItemProperty
public ChoiceDialog()
getItems()を呼び出して、ユーザーに表示するアイテムを指定する必要があります。 public ChoiceDialog(T defaultChoice, T... choices)
defaultChoice - ダイアログで事前選択済の選択肢として表示されるアイテム。 このアイテムは選択肢可変引数配列に含まれている必要があります。 choices - ユーザーに表示可能なすべての選択肢。public ChoiceDialog(T defaultChoice, Collection<T> choices)
defaultChoice - ダイアログで事前選択済の選択肢として表示されるアイテム。 このアイテムは選択肢可変引数配列に含まれている必要があります。 choices - ユーザーに表示可能なすべての選択肢。public final T getSelectedItem()
public final ReadOnlyObjectProperty<T> selectedItemProperty()
public final void setSelectedItem(T item)
item - ダイアログで選択するアイテム。public final ObservableList<T> getItems()
public final T getDefaultChoice()
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.