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 int
BYTES
static int
DOUBLE
static int
INT
static int
LONG
static int
STRING
-
Fields inherited from class docking.DialogComponentProvider
applyButton, buttonPanel, cancelButton, dismissButton, okButton, rootPanel
-
-
Constructor Summary
Constructors Modifier Constructor Description AskDialog(java.awt.Component parent, java.lang.String title, java.lang.String message, int type)
AskDialog(java.awt.Component parent, java.lang.String title, java.lang.String message, int type, java.util.List<T> choices, java.lang.Object defaultValue)
protected
AskDialog(java.lang.String dialogTitle, java.lang.String message, int type)
AskDialog(java.lang.String dialogTitle, java.lang.String message, int type, java.lang.Object defaultValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
cancelCallback()
The callback method for when the "Cancel" button is pressed.T
getChoiceValue()
java.lang.String
getTextFieldValue()
protected java.lang.Double
getValueAsDouble()
protected java.lang.Integer
getValueAsInt()
protected java.lang.Long
getValueAsLong()
java.lang.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, dialogClosed, dialogShown, dismissCallback, dispose, doInitialize, escapeCallback, executeProgressTask, getActionContext, getActions, getBackground, getBounds, getComponent, getDefaultButton, getDefaultSize, getDialogSize, getFocusComponent, getGlassPane, getHelpLocatdion, getId, getIntialLocation, getLocationOnScreen, getParent, getPreferredSize, getRemberSize, getRememberLocation, 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
-
-
-
-
Field Detail
-
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 Detail
-
AskDialog
protected AskDialog(java.lang.String dialogTitle, java.lang.String message, int type)
-
AskDialog
public AskDialog(java.lang.String dialogTitle, java.lang.String message, int type, java.lang.Object defaultValue)
-
AskDialog
public AskDialog(java.awt.Component parent, java.lang.String title, java.lang.String message, int type)
-
AskDialog
public AskDialog(java.awt.Component parent, java.lang.String title, java.lang.String message, int type, java.util.List<T> choices, java.lang.Object defaultValue)
-
-
Method Detail
-
getChoiceValue
public T getChoiceValue()
-
getTextFieldValue
public java.lang.String getTextFieldValue()
-
okCallback
protected void okCallback()
Description copied from class:DialogComponentProvider
The callback method for when the "OK" button is pressed.- Overrides:
okCallback
in classDialogComponentProvider
-
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 classDialogComponentProvider
-
isCanceled
public boolean isCanceled()
-
getValueAsString
public java.lang.String getValueAsString()
-
getValueAsInt
protected java.lang.Integer getValueAsInt()
-
getValueAsLong
protected java.lang.Long getValueAsLong()
-
getValueAsDouble
protected java.lang.Double getValueAsDouble()
-
-