Class TextInputDialog
- All Implemented Interfaces:
EventTarget
-
Property Summary
Properties declared in class Dialog
contentText, dialogPane, graphic, headerText, height, onCloseRequest, onHidden, onHiding, onShowing, onShown, resizable, resultConverter, result, showing, title, width, x, yTypePropertyDescriptionfinal StringPropertyA property representing the content text for the dialog pane.final ObjectProperty<DialogPane> The root node of the dialog, theDialogPanecontains all visual elements shown in the dialog.final ObjectProperty<Node> The dialog graphic, presented either in the header, if one is showing, or to the left of thecontent.final StringPropertyA property representing the header text for the dialog pane.final ReadOnlyDoublePropertyProperty representing the height of the dialog.final ObjectProperty<EventHandler<DialogEvent>> Called when there is an external request to close thisDialog.final ObjectProperty<EventHandler<DialogEvent>> Called just after the Dialog has been hidden.final ObjectProperty<EventHandler<DialogEvent>> Called just prior to the Dialog being hidden.final ObjectProperty<EventHandler<DialogEvent>> Called just prior to the Dialog being shown.final ObjectProperty<EventHandler<DialogEvent>> Called just after the Dialog is shown.final BooleanPropertyRepresents whether the dialog is resizable.final ObjectProperty<Callback<ButtonType, String>> API to convert theButtonTypethat the user clicked on into a result that can be returned via theresultproperty.final ObjectProperty<String> A property representing what has been returned from the dialog.final ReadOnlyBooleanPropertyRepresents whether the dialog is currently showing.final StringPropertyReturn the titleProperty of the dialog.final ReadOnlyDoublePropertyProperty representing the width of the dialog.final ReadOnlyDoublePropertyThe horizontal location of thisDialog.final ReadOnlyDoublePropertyThe vertical location of thisDialog. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new TextInputDialog without a default value entered into the dialogTextField.TextInputDialog(String defaultValue) Creates a new TextInputDialog with the default value entered into the dialogTextField. -
Method Summary
Methods declared in class Dialog
addEventFilter, addEventHandler, 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, removeEventFilter, removeEventHandler, 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, yPropertyModifier and TypeMethodDescriptionfinal <E extends Event>
voidaddEventFilter(EventType<E> eventType, EventHandler<? super E> eventFilter) Registers an event filter for this target.final <E extends Event>
voidaddEventHandler(EventType<E> eventType, EventHandler<? super E> eventHandler) Registers an event handler for this target.Construct an event dispatch chain for this target.final voidclose()Closes thisDialog.final StringPropertyA property representing the content text for the dialog pane.final ObjectProperty<DialogPane> The root node of the dialog, theDialogPanecontains all visual elements shown in the dialog.final StringReturns the currently-set content text for this DialogPane.final DialogPaneGets the value of thedialogPaneproperty.final NodeGets the value of thegraphicproperty.final StringReturns the currently-set header text for this DialogPane.final doubleReturns the height of the dialog.final ModalityRetrieves the modality attribute for this dialog.final EventHandler<DialogEvent> Gets the value of theonCloseRequestproperty.final EventHandler<DialogEvent> Gets the value of theonHiddenproperty.final EventHandler<DialogEvent> Gets the value of theonHidingproperty.final EventHandler<DialogEvent> Gets the value of theonShowingproperty.final EventHandler<DialogEvent> Gets the value of theonShownproperty.final WindowgetOwner()Retrieves the owner Window for this dialog, or null for an unowned dialog.final StringGets the value of theresultproperty.final Callback<ButtonType, String> Gets the value of theresultConverterproperty.final StringgetTitle()Return the title of the dialog.final doublegetWidth()Returns the width of the dialog.final doublegetX()Gets the value of thexproperty.final doublegetY()Gets the value of theyproperty.final ObjectProperty<Node> The dialog graphic, presented either in the header, if one is showing, or to the left of thecontent.final StringPropertyA property representing the header text for the dialog pane.final ReadOnlyDoublePropertyProperty representing the height of the dialog.final voidhide()Hides thisDialog.final voidinitModality(Modality modality) Specifies the modality for this dialog.final voidSpecifies the ownerWindowfor this dialog, or null for a top-level, unowned dialog.final voidinitStyle(StageStyle style) Specifies the style for this dialog.final booleanReturns whether or not the dialog is resizable.final booleanReturns whether or not the dialog is showing.final ObjectProperty<EventHandler<DialogEvent>> Called when there is an external request to close thisDialog.final ObjectProperty<EventHandler<DialogEvent>> Called just after the Dialog has been hidden.final ObjectProperty<EventHandler<DialogEvent>> Called just prior to the Dialog being hidden.final ObjectProperty<EventHandler<DialogEvent>> Called just prior to the Dialog being shown.final ObjectProperty<EventHandler<DialogEvent>> Called just after the Dialog is shown.final <E extends Event>
voidremoveEventFilter(EventType<E> eventType, EventHandler<? super E> eventFilter) Unregisters a previously registered event filter from this target.final <E extends Event>
voidremoveEventHandler(EventType<E> eventType, EventHandler<? super E> eventHandler) Unregisters a previously registered event handler from this target.final BooleanPropertyRepresents whether the dialog is resizable.final ObjectProperty<Callback<ButtonType, String>> API to convert theButtonTypethat the user clicked on into a result that can be returned via theresultproperty.final ObjectProperty<String> A property representing what has been returned from the dialog.final voidsetContentText(String contentText) Sets the string to show in the dialog content area.final voidsetDialogPane(DialogPane value) Sets the value of thedialogPaneproperty.final voidsetGraphic(Node graphic) Sets the dialog graphic, which will be displayed either in the header, if one is showing, or to the left of thecontent.final voidsetHeaderText(String headerText) Sets the string to show in the dialog header area.final voidsetHeight(double height) Sets the height of the dialog.final voidsetOnCloseRequest(EventHandler<DialogEvent> value) Sets the value of theonCloseRequestproperty.final voidsetOnHidden(EventHandler<DialogEvent> value) Sets the value of theonHiddenproperty.final voidsetOnHiding(EventHandler<DialogEvent> value) Sets the value of theonHidingproperty.final voidsetOnShowing(EventHandler<DialogEvent> value) Sets the value of theonShowingproperty.final voidsetOnShown(EventHandler<DialogEvent> value) Sets the value of theonShownproperty.final voidsetResizable(boolean resizable) Sets whether the dialog can be resized by the user.final voidSets the value of theresultproperty.final voidsetResultConverter(Callback<ButtonType, String> value) Sets the value of theresultConverterproperty.final voidChange the Title of the dialog.final voidsetWidth(double width) Sets the width of the dialog.final voidsetX(double x) Sets the value of thexproperty.final voidsetY(double y) Sets the value of theyproperty.final voidshow()Shows the dialog but does not wait for a user response (in other words, this brings up a non-blocking dialog).Shows the dialog and waits for the user response (in other words, brings up a blocking dialog, with the returned value the users input).final ReadOnlyBooleanPropertyRepresents whether the dialog is currently showing.final StringPropertyReturn the titleProperty of the dialog.final ReadOnlyDoublePropertyProperty representing the width of the dialog.final ReadOnlyDoublePropertyThe horizontal location of thisDialog.final ReadOnlyDoublePropertyThe vertical location of thisDialog.
-
Constructor Details
-
TextInputDialog
public TextInputDialog()Creates a new TextInputDialog without a default value entered into the dialogTextField. -
TextInputDialog
-
-
Method Details
-
getEditor
-
getDefaultValue
Returns the default value that was specified in the constructor.- Returns:
- the default value that was specified in the constructor
-