Package ghidra.app.util

# Class AddEditDialog

java.lang.Object
docking.DialogComponentProvider
docking.ReusableDialogComponentProvider
ghidra.app.util.AddEditDialog

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

public class AddEditDialog extends ReusableDialogComponentProvider
Dialog used to a label or to edit an existing label.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `class`
  `AddEditDialog.NamespaceWrapper`

- ## Field Summary

  ### Fields inherited from class docking.DialogComponentProvider

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AddEditDialog(String title, PluginTool tool)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addLabel(Address address, Program prog)`
  Invokes the dialog to add a new label in the given program at the given address
  `void`
  `addLabel(Address address, Program targetProgram, ComponentProvider provider)`
  Invokes the dialog to add a new label in the given program at the given address
  `void`
  `addLabel(Address address, Program targetProgram, Component centeredOverComponent)`
  Invokes the dialog to add a new label in the given program at the given address
  `void`
  `close()`
  `void`
  `editLabel(Symbol targetSymbol, Program targetProgram)`
  Invokes the dialog to edit an existing label in the given program
  `void`
  `editLabel(Symbol targetSymbol, Program targetProgram, ComponentProvider provider)`
  Invokes the dialog to edit an existing label in the given program
  `void`
  `editLabel(Symbol targetSymbol, Program targetProgram, Component centeredOverComponent)`
  Invokes the dialog to edit an existing label in the given program
  `protected void`
  `okCallback()`
  The callback method for when the "OK" button is pressed.
  `void`
  `setReusable(boolean isReusable)`
  Signals that the client wishes to reuse the dialog instead of creating a new instance each time the dialog is shown.

  ### Methods inherited from class docking.ReusableDialogComponentProvider

  `dispose`

  ### Methods inherited from class docking.DialogComponentProvider

  `addAction, addApplyButton, addButton, addCancelButton, addDismissButton, addOKButton, addWorkPanel, alertMessage, alertMessage, applyCallback, cancelCallback, cancelCurrentTask, clearScheduledTask, clearStatusText, 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`

- ## Constructor Details

  - ### AddEditDialog

    public AddEditDialog(String title, PluginTool tool)

- ## Method Details

  - ### setReusable

    public void setReusable(boolean isReusable)
    Signals that the client wishes to reuse the dialog instead of creating a new instance each time the dialog is shown.

    When not reusable, closing this dialog will call `ReusableDialogComponentProvider.dispose()`.

    Parameters:
      `isReusable` - true when being reused

  - ### close

    public void close()
    Overrides:
      `close` in class `ReusableDialogComponentProvider`

  - ### addLabel

    public void addLabel(Address address, Program prog)
    Invokes the dialog to add a new label in the given program at the given address
    Parameters:
      `address` - the address at which to add a new label
      `prog` - the program in which to add a new label

  - ### addLabel

    public void addLabel(Address address, Program targetProgram, ComponentProvider provider)
    Invokes the dialog to add a new label in the given program at the given address
    Parameters:
      `address` - the address at which to add a new label
      `targetProgram` - the program in which to add a new label
      `provider` - the ComponentProvider to parent and center the dialog over.

  - ### addLabel

    public void addLabel(Address address, Program targetProgram, Component centeredOverComponent)
    Invokes the dialog to add a new label in the given program at the given address
    Parameters:
      `address` - the address at which to add a new label
      `targetProgram` - the program in which to add a new label
      `centeredOverComponent` - the component over which to center the dialog

  - ### editLabel

    public void editLabel(Symbol targetSymbol, Program targetProgram)
    Invokes the dialog to edit an existing label in the given program
    Parameters:
      `targetSymbol` - the symbol(label) to edit
      `targetProgram` - the program containing the symbol

  - ### editLabel

    public void editLabel(Symbol targetSymbol, Program targetProgram, Component centeredOverComponent)
    Invokes the dialog to edit an existing label in the given program
    Parameters:
      `targetSymbol` - the symbol(label) to edit
      `targetProgram` - the program containing the symbol
      `centeredOverComponent` - the component over which to center the dialog

  - ### editLabel

    public void editLabel(Symbol targetSymbol, Program targetProgram, ComponentProvider provider)
    Invokes the dialog to edit an existing label in the given program
    Parameters:
      `targetSymbol` - the symbol(label) to edit
      `targetProgram` - the program containing the symbol
      `provider` - the ComponentProvider to parent and center the dialog over.

  - ### okCallback

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