Package ghidra.app.util
Class OptionsDialog
- java.lang.Object
-
- docking.DialogComponentProvider
-
- ghidra.app.util.OptionsDialog
-
- All Implemented Interfaces:
ActionContextProvider
,OptionListener
,StatusListener
,TaskListener
public class OptionsDialog extends DialogComponentProvider implements OptionListener
Dialog for editing the import options for a selected importer format.
-
-
Field Summary
-
Fields inherited from class docking.DialogComponentProvider
applyButton, buttonPanel, cancelButton, dismissButton, okButton, rootPanel
-
-
Constructor Summary
Constructors Constructor Description OptionsDialog(java.util.List<Option> originalOptions, OptionValidator validator, AddressFactoryService addressFactoryService)
Contructs a new OptionsDialog for editing the options associated with a specific import format such as PE, ELF, XML, etc.
-
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.void
close()
java.util.List<Option>
getOptions()
Returns the list of Options with the values as they were set in this dialog.protected void
okCallback()
The callback method for when the "OK" button is pressed.void
optionChanged(Option option)
Notification that the given option changed.boolean
wasCancelled()
-
Methods inherited from class docking.DialogComponentProvider
addAction, addApplyButton, addButton, addCancelButton, addDismissButton, addOKButton, addWorkPanel, alertMessage, alertMessage, applyCallback, cancelCurrentTask, clearScheduledTask, clearStatusText, 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
-
-
-
-
Constructor Detail
-
OptionsDialog
public OptionsDialog(java.util.List<Option> originalOptions, OptionValidator validator, AddressFactoryService addressFactoryService)
Contructs a new OptionsDialog for editing the options associated with a specific import format such as PE, ELF, XML, etc.- Parameters:
originalOptions
- the list of options generated from the specific import format selected.validator
- a callback for validating the options as they are set.addressFactoryService
- a service for retrieving the AddressFactory if needed. This is passed instead of an actual AddressFactory, because to get an AddressFactory, it might require that a language be loaded or a program be opened and not all options require an AddressFactory.
-
-
Method Detail
-
optionChanged
public void optionChanged(Option option)
Description copied from interface:OptionListener
Notification that the given option changed.- Specified by:
optionChanged
in interfaceOptionListener
- Parameters:
option
- option that changed
-
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
-
wasCancelled
public boolean wasCancelled()
-
close
public void close()
- Overrides:
close
in classDialogComponentProvider
-
getOptions
public java.util.List<Option> getOptions()
Returns the list of Options with the values as they were set in this dialog.- Returns:
- the list of Options with the values as they were set in this dialog.
-
-