Package ghidra.app.util.bean
Class SetEquateDialog
- java.lang.Object
-
- docking.DialogComponentProvider
-
- ghidra.app.util.bean.SetEquateDialog
-
- All Implemented Interfaces:
ActionContextProvider,StatusListener,TaskListener
public class SetEquateDialog extends DialogComponentProvider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classSetEquateDialog.EquateRowObjectstatic classSetEquateDialog.SelectionType
-
Field Summary
Fields Modifier and Type Field Description static intCANCELEDstatic intOK-
Fields inherited from class docking.DialogComponentProvider
applyButton, cancelButton, dismissButton, okButton, rootPanel
-
-
Constructor Summary
Constructors Constructor Description SetEquateDialog(PluginTool tool, Program program, Scalar value)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.swing.JPanelbuildMainPanel()Builds the main panel of the dialog and returns it.protected voidcancelCallback()Called when user selects Cancel Button.voiddispose()EnumgetEnumDataType()Get's the user selected entry in the dialog and returns the enum data type for that entryjava.lang.StringgetEquateName()Get the Equate Name entered or chosen by the user.booleangetOverwriteExisting()Returns true if the user has chosen to overwrite any existing equate rules.SetEquateDialog.SelectionTypegetSelectionType()Returns the type of selection the user has chosen.protected voidokCallback()Called when user selects OK buttonvoidsetHasSelection(ListingActionContext context)Set the state of the some buttons on the dialog.intshowRenameDialog()Invoke the dialog.intshowSetDialog()Invoke the dialog.-
Methods inherited from class docking.DialogComponentProvider
addAction, addApplyButton, addButton, addCancelButton, addDismissButton, addOKButton, addWorkPanel, alertMessage, alertMessage, applyCallback, cancelCurrentTask, clearScheduledTask, clearStatusText, close, dialogClosed, dialogShown, dismissCallback, doInitialize, escapeCallback, executeProgressTask, getActionContext, getActions, getBackground, getBounds, getComponent, getDefaultButton, getDefaultSize, getDialogSize, getFocusComponent, getGlassPane, getIntialLocation, getLocationOnScreen, getPreferredSize, getRemberSize, getRememberLocation, getStatusLabel, getStatusText, getTaskMonitorComponent, getTaskScheduler, getTitle, getUseSharedLocation, hideTaskMonitorComponent, isApplyEnabled, isCancelEnabled, isModal, isOKEnabled, isResizeable, isRunningTask, isShowing, isTransient, isVisible, main, 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
-
CANCELED
public static final int CANCELED
- See Also:
- Constant Field Values
-
OK
public static final int OK
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SetEquateDialog
public SetEquateDialog(PluginTool tool, Program program, Scalar value)
Constructor- Parameters:
parent- the parent frame to host the dialog.plugin- the EquatePlugin that launched this dialog(used to validate input)labelText- a text string indicating the numeric value being equated.equates- a list of equates that already exist for this numeric value.
-
-
Method Detail
-
buildMainPanel
protected javax.swing.JPanel buildMainPanel()
Builds the main panel of the dialog and returns it.
-
showSetDialog
public int showSetDialog()
Invoke the dialog.- Returns:
- the exit condition of the dialog. The return value can be one of: CANCELED - the user canceled the action. OK - the user pressed the "Ok" button or pressed the return key in the textfield.
-
showRenameDialog
public int showRenameDialog()
Invoke the dialog.- Returns:
- the exit condition of the dialog. The return value can be one of: CANCELED - the user canceled the action. OK - the user pressed the "Ok" button or pressed the return key in the textfield.
-
getEquateName
public java.lang.String getEquateName()
Get the Equate Name entered or chosen by the user.
-
getEnumDataType
public Enum getEnumDataType()
Get's the user selected entry in the dialog and returns the enum data type for that entry- Returns:
- the enum data type for the selected entry, or null if there is no enum.
-
getSelectionType
public SetEquateDialog.SelectionType getSelectionType()
Returns the type of selection the user has chosen.- Returns:
-
getOverwriteExisting
public boolean getOverwriteExisting()
Returns true if the user has chosen to overwrite any existing equate rules.- Returns:
-
setHasSelection
public void setHasSelection(ListingActionContext context)
Set the state of the some buttons on the dialog. ie: if the user has selected a range of addresses we should automatically set the "selection" radio button to the selected state.- Parameters:
context- The current context.
-
okCallback
protected void okCallback()
Called when user selects OK button- Overrides:
okCallbackin classDialogComponentProvider
-
cancelCallback
protected void cancelCallback()
Called when user selects Cancel Button.- Overrides:
cancelCallbackin classDialogComponentProvider
-
dispose
public void dispose()
-
-