Class InputDialog

    • Constructor Detail

      • InputDialog

        public InputDialog​(java.lang.String dialogTitle,
                           java.lang.String label)
        Creates a provider for a generic input dialog with the specified title, a text field, labeled by the specified label. The user should check the value of "isCanceled()" to know whether or not the user canceled the operation. Otherwise, use the "getValue()" or "getValues()" to get the value(s) entered by the user. Use the tool's "showDialog()" to display the dialog.

        Parameters:
        dialogTitle - used as the name of the dialog's title bar
        label - value to use for the label of the text field
      • InputDialog

        public InputDialog​(java.lang.String dialogTitle,
                           java.lang.String label,
                           InputDialogListener listener)
        Creates a generic input dialog with the specified title, a text field, labeled by the specified label. The user should check the value of "isCanceled()" to know whether or not the user canceled the operation. Otherwise, use the "getValue()" or "getValues()" to get the value(s) entered by the user. Use the tool's "showDialog()" to display the dialog.

        Parameters:
        dialogTitle - used as the name of the dialog's title bar
        label - value to use for the label of the text field
        listener - listener that is called when the OK button is hit
      • InputDialog

        public InputDialog​(java.lang.String dialogTitle,
                           java.lang.String label,
                           java.lang.String initialValue)
        Creates a generic input dialog with the specified title, a text field, labeled by the specified label. The user should check the value of "isCanceled()" to know whether or not the user canceled the operation. Otherwise, use the "getValue()" or "getValues()" to get the value(s) entered by the user. Use the tool's "showDialog()" to display the dialog.

        Parameters:
        dialogTitle - used as the name of the dialog's title bar
        label - value to use for the label of the text field
        initialValue - initial value to use for the text field
      • InputDialog

        public InputDialog​(java.lang.String dialogTitle,
                           java.lang.String label,
                           java.lang.String initialValue,
                           InputDialogListener listener)
        Creates a generic input dialog with the specified title, a text field, labeled by the specified label. The user should check the value of "isCanceled()" to know whether or not the user canceled the operation. Otherwise, use the "getValue()" or "getValues()" to get the value(s) entered by the user. Use the tool's "showDialog()" to display the dialog.

        Parameters:
        dialogTitle - used as the name of the dialog's title bar
        label - value to use for the label of the text field
        initialValue - initial value to use for the text field
      • InputDialog

        public InputDialog​(java.lang.String dialogTitle,
                           java.lang.String label,
                           boolean isModal)
        Creates a generic input dialog with the specified title, a text field, labeled by the specified label. The user should check the value of "isCanceled()" to know whether or not the user canceled the operation. Otherwise, use the "getValue()" or "getValues()" to get the value(s) entered by the user. Use the tool's "showDialog()" to display the dialog.

        Parameters:
        dialogTitle - used as the name of the dialog's title bar
        label - values to use for the label of the text field
        isModal - whether or not the dialog is to be modal
      • InputDialog

        public InputDialog​(java.lang.String dialogTitle,
                           java.lang.String label,
                           java.lang.String initialValue,
                           boolean isModal)
        Creates a generic input dialog with the specified title, a text field, labeled by the specified label. The user should check the value of "isCanceled()" to know whether or not the user canceled the operation. Otherwise, use the "getValue()" or "getValues()" to get the value(s) entered by the user. Use the tool's "showDialog()" to display the dialog.

        Parameters:
        dialogTitle - used as the name of the dialog's title bar
        label - value to use for the label of the text field
        initialValue - initial value to use for the text field
        isModal - whether or not the dialog is to be modal
      • InputDialog

        public InputDialog​(java.lang.String dialogTitle,
                           java.lang.String[] labels,
                           java.lang.String[] initialValues)
        Creates a generic input dialog with the specified title, a text field, labeled by the specified label. The user should check the value of "isCanceled()" to know whether or not the user canceled the operation. Otherwise, use the "getValue()" or "getValues()" to get the value(s) entered by the user. Use the tool's "showDialog()" to display the dialog.

        Parameters:
        dialogTitle - used as the name of the dialog's title bar
        labels - values to use for the labels of the text fields
        initialValues - initial values to use for the text fields
      • InputDialog

        public InputDialog​(java.lang.String dialogTitle,
                           java.lang.String[] labels,
                           java.lang.String[] initialValues,
                           boolean isModal,
                           InputDialogListener listener)
        Creates a generic input dialog with the specified title, a text field, labeled by the specified label. The user should check the value of "isCanceled()" to know whether or not the user canceled the operation. Otherwise, use the "getValue()" or "getValues()" to get the value(s) entered by the user. Use the tool's "showDialog()" to display the dialog.

        Parameters:
        dialogTitle - used as the name of the dialog's title bar
        labels - values to use for the labels of the text fields
        initialValues - initial values to use for the text fields
        isModal - whether or not the dialog is to be modal
        listener - listener that is called when the OK button is hit
    • Method Detail

      • cancelCallback

        protected void cancelCallback()
        Description copied from class: DialogComponentProvider
        The callback method for when the "Cancel" button is pressed. The default behavior is to call setVisible(false) and dispose() on the dialog.
        Overrides:
        cancelCallback in class DialogComponentProvider
      • isCanceled

        public boolean isCanceled()
        Returns if this dialog is cancelled.
      • getValue

        public java.lang.String getValue()
        return the value of the first (and maybe only) text field
      • getValues

        public java.lang.String[] getValues()
        return the values for all the text field(s)
      • resetValues

        public void resetValues()
        reset all the text fields to their initial values