- java.lang.Object
-
- javafx.scene.control.Dialog<String>
-
- javafx.scene.control.TextInputDialog
-
- All Implemented Interfaces:
-
EventTarget
public class TextInputDialog extends Dialog<String>
显示给用户的文本输入控件的对话框。- 从以下版本开始:
- JavaFX 8u40
- 另请参见:
-
Dialog
-
-
Property Summary
-
Properties inherited from class javafx.scene.control.Dialog
contentText, dialogPane, graphic, headerText, height, onCloseRequest, onHidden, onHiding, onShowing, onShown, resizable, resultConverter, result, showing, title, width, x, y
-
-
构造方法摘要
构造方法 Constructor 描述 TextInputDialog()
创建一个新的TextInputDialog,而不会在对话框TextField
中输入默认值。TextInputDialog(String defaultValue)
创建一个新的TextInput对话框,其默认值输入到对话框TextField
。
-
方法摘要
所有方法 接口方法 具体的方法 Modifier and Type 方法 描述 String
getDefaultValue()
返回在构造函数中指定的默认值。TextField
getEditor()
返回此对话框中使用的TextField
。-
Methods inherited from class javafx.scene.control.Dialog
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, yProperty
-
-
-
-
构造方法详细信息
-
TextInputDialog
public TextInputDialog()
创建一个新的TextInputDialog,而不会在对话框TextField
中输入默认值。
-
TextInputDialog
public TextInputDialog(String defaultValue)
创建一个新的TextInputDialog,其默认值输入到对话框TextField
中 。- 参数
-
defaultValue
- 输入到对话框的默认值
-
-