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
  `class`
  `SetEquateDialog.EquateRowObject`
  `static enum`
  `SetEquateDialog.SelectionType`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `CANCELED`
  `static final int`
  `OK`

  ### Fields inherited from class docking.DialogComponentProvider

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SetEquateDialog(PluginTool tool, Program program, Scalar value)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected JPanel`
  `buildMainPanel()`
  `protected void`
  `cancelCallback()`
  The callback method for when the "Cancel" button is pressed.
  `void`
  `disableHasSelection()`
  For using the dialog outside of the EquatePlugin, the "Apply to Current" radio button can be selected and the other buttons disabled.
  `void`
  `dispose()`
  Disposes this dialog.
  `Enum`
  `getEnumDataType()`
  Get's the user selected entry in the dialog and returns the enum data type for that entry
  `String`
  `getEquateName()`
  `boolean`
  `getOverwriteExisting()`
  Returns true if the user has chosen to overwrite any existing equate rules.
  `SetEquateDialog.SelectionType`
  `getSelectionType()`
  Returns the type of selection the user has chosen.
  `protected void`
  `okCallback()`
  The callback method for when the "OK" button is pressed.
  `void`
  `setHasSelection(ListingActionContext context)`
  Set the state of the some buttons on the dialog.
  `int`
  `showRenameDialog()`
  Invoke the dialog.
  `int`
  `showSetDialog()`
  Invoke the dialog.

  ### Methods inherited from class docking.DialogComponentProvider

  `addAction, addApplyButton, addButton, addCancelButton, addDismissButton, addOKButton, addWorkPanel, alertMessage, alertMessage, applyCallback, cancelCurrentTask, clearScheduledTask, clearStatusText, close, closeDialog, dialogClosed, dialogShown, dismissCallback, 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

  - ### CANCELED

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

  - ### OK

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

- ## Constructor Details

  - ### SetEquateDialog

    public SetEquateDialog(PluginTool tool, Program program, Scalar value)
    Constructor
    Parameters:
      `tool` - the EquatePlugin that launched this dialog(used to validate input)
      `program` - the program the equate is located in.
      `value` - the equate value to set.

- ## Method Details

  - ### buildMainPanel

    protected JPanel buildMainPanel()

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

  - ### 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:
      the selection type

  - ### getOverwriteExisting

    public boolean getOverwriteExisting()
    Returns true if the user has chosen to overwrite any existing equate rules.
    Returns:
      true if the user has chosen to overwrite any existing equate rules.

  - ### 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.

  - ### disableHasSelection

    public void disableHasSelection()
    For using the dialog outside of the EquatePlugin, the "Apply to Current" radio button can be selected and the other buttons disabled.

  - ### 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`

  - ### dispose

    public void dispose()
    Description copied from class: `DialogComponentProvider`
    Disposes this dialog. Only call this when the dialog is no longer used. Calling this method will close the dialog if it is open.
    Overrides:
      `dispose` in class `DialogComponentProvider`