Package ghidra.app.script

# Class AskDialog<T>

java.lang.Object
docking.DialogComponentProvider
ghidra.app.script.AskDialog<T>

All Implemented Interfaces:
  `ActionContextProvider`, `StatusListener`, `TaskListener`

public class AskDialog<T> extends DialogComponentProvider

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `BYTES`
  `static final int`
  `DOUBLE`
  `static final int`
  `INT`
  `static final int`
  `LONG`
  `static final int`
  `STRING`

  ### Fields inherited from class docking.DialogComponentProvider

  `applyButton, buttonPanel, cancelButton, dismissButton, okButton, rootPanel`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  ``
  `AskDialog(Component parent, String title, String message, int type)`
  ``
  `AskDialog(Component parent, String title, String message, int type, List<T> choices, Object defaultValue)`
  `protected`
  `AskDialog(String dialogTitle, String message, int type)`
  ``
  `AskDialog(String dialogTitle, String message, int type, Object defaultValue)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `cancelCallback()`
  The callback method for when the "Cancel" button is pressed.
  `T`
  `getChoiceValue()`
  `String`
  `getTextFieldValue()`
  `protected Double`
  `getValueAsDouble()`
  `protected Integer`
  `getValueAsInt()`
  `protected Long`
  `getValueAsLong()`
  `String`
  `getValueAsString()`
  `boolean`
  `isCanceled()`
  `protected void`
  `okCallback()`
  The callback method for when the "OK" button is pressed.

  ### Methods inherited from class docking.DialogComponentProvider

  `addAction, addApplyButton, addButton, addCancelButton, addDismissButton, addOKButton, addWorkPanel, alertMessage, alertMessage, applyCallback, cancelCurrentTask, clearScheduledTask, clearStatusText, close, closeDialog, dialogClosed, dialogShown, dismissCallback, dispose, doInitialize, escapeCallback, executeProgressTask, getActionContext, getActions, getBackground, getBounds, getComponent, getDefaultButton, getDefaultSize, getDialogSize, getFocusComponent, getGlassPane, getHelpLocation, getId, getInitialLocation, getLocationOnScreen, getParent, getPreferredSize, getRememberLocation, getRememberSize, getStatusColor, getStatusLabel, getStatusText, getTaskMonitorComponent, getTaskScheduler, getTitle, getUseSharedLocation, hideTaskMonitorComponent, isApplyEnabled, isCancelEnabled, isModal, isOKEnabled, isResizeable, isRunningTask, isShowing, isTransient, isVisible, notifyContextChanged, removeAction, removeButton, removeWorkPanel, repack, setApplyEnabled, setApplyToolTip, setBackground, setCancelButtonText, setCancelEnabled, setCancelToolTip, setCursor, setDefaultButton, setDefaultSize, setDialogSize, setDismissToolTip, setFocusComponent, setGlassPane, setHelpLocation, setInitialLocation, setMinimumSize, setMinimumSize, setOkButtonText, setOkEnabled, setOkToolTip, setPreferredSize, setRememberLocation, setRememberSize, setResizable, setStatusJustification, setStatusText, setStatusText, setStatusText, setTitle, setTransient, setUseSharedLocation, showProgressBar, showTaskMonitorComponent, stopProgressTimer, taskCancelled, taskCompleted, toFront, toString, waitForCurrentTask`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### STRING

    public static final int STRING
    See Also:
      - Constant Field Values

  - ### INT

    public static final int INT
    See Also:
      - Constant Field Values

  - ### LONG

    public static final int LONG
    See Also:
      - Constant Field Values

  - ### DOUBLE

    public static final int DOUBLE
    See Also:
      - Constant Field Values

  - ### BYTES

    public static final int BYTES
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### AskDialog

    protected AskDialog(String dialogTitle, String message, int type)

  - ### AskDialog

    public AskDialog(String dialogTitle, String message, int type, Object defaultValue)

  - ### AskDialog

    public AskDialog(Component parent, String title, String message, int type)

  - ### AskDialog

    public AskDialog(Component parent, String title, String message, int type, List<T> choices, Object defaultValue)

- ## Method Details

  - ### getChoiceValue

    public T getChoiceValue()

  - ### getTextFieldValue

    public String getTextFieldValue()

  - ### okCallback

    protected void okCallback()
    Description copied from class: `DialogComponentProvider`
    The callback method for when the "OK" button is pressed.
    Overrides:
      `okCallback` in class `DialogComponentProvider`

  - ### 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()

  - ### getValueAsString

    public String getValueAsString()

  - ### getValueAsInt

    protected Integer getValueAsInt()

  - ### getValueAsLong

    protected Long getValueAsLong()

  - ### getValueAsDouble

    protected Double getValueAsDouble()