Class StructureMergeDialog
java.lang.Object
docking.DialogComponentProvider
ghidra.app.merge.structures.StructureMergeDialog
- All Implemented Interfaces:
ActionContextProvider, StatusListener, TaskListener
Dialog for merging structures. The dialog is constructed given two structures and it will
merge them, producing a third merged structure. The dialog will then display all three
structures and provide controls for dealing with conflicts, allowing the user to choose
components from the left or right side structures.
The dialog itself doesn't do anything with the resulting merged structure. Clients need to provide an apply consumer that will be called when the user presses the dialog's apply button.
The dialog also provides the following actions as keyboard only actions:
- Apply Item (<SPACE>): pressing the space bar key will apply the currently focussed and selected item from either the left side or right sided. (Assuming it is applicable).
- Focus Left Side (<LEFT ARROW>): pressing the left arrow will give focus to the left side display.
- Focus Right Side (<RIGHT ARROW>): pressing the right arrow will give focus to the right side display.
-
Field Summary
Fields inherited from class DialogComponentProvider
applyButton, buttonPanel, cancelButton, dismissButton, okButton, rootPanel -
Constructor Summary
ConstructorsConstructorDescriptionStructureMergeDialog(String title, Structure struct1, Structure struct2, ExceptionalConsumer<Structure, Exception> applyConsumer) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected voidThe callback method for when the "Apply" button is pressed.getActionContext(MouseEvent event) An optional extension point for subclasses to provider action context for the actions used by this provider.Methods inherited from class DialogComponentProvider
addAction, addApplyButton, addButton, addCancelButton, addDismissButton, addOKButton, addWorkPanel, alertMessage, alertMessage, cancelCallback, cancelCurrentTask, clearScheduledTask, clearStatusText, close, closeDialog, createSharedActions, dialogClosed, dialogShown, dismissCallback, dispose, doInitialize, escapeCallback, executeProgressTask, 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, isDialogKeyBindingAction, isModal, isOKEnabled, isResizeable, isRunningTask, isShowing, isTransient, isVisible, notifyContextChanged, okCallback, okCallback, removeAction, removeButton, removeWorkPanel, repack, setAccessibleDescription, 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 Details
-
StructureMergeDialog
public StructureMergeDialog(String title, Structure struct1, Structure struct2, ExceptionalConsumer<Structure, Exception> applyConsumer) Constructor- Parameters:
title- the dialog title.struct1- the first structure (will receive precedence for any conflicting componentsstruct2- the second structureapplyConsumer- the consumer to call when the user presses the apply button. This consumer can throw an exception which will be displayed in the dialog and the dialog won't close. If the apply does not throw an exception, the dialog will be closed.
-
-
Method Details
-
getActionContext
Description copied from class:DialogComponentProviderAn optional extension point for subclasses to provider action context for the actions used by this provider.- Specified by:
getActionContextin interfaceActionContextProvider- Overrides:
getActionContextin classDialogComponentProvider- Parameters:
event- The mouse event used (may be null) to generate a popup menu
-
applyCallback
protected void applyCallback()Description copied from class:DialogComponentProviderThe callback method for when the "Apply" button is pressed.- Overrides:
applyCallbackin classDialogComponentProvider
-