Package ghidra.app.util.datatype
Class DataTypeSelectionDialog
java.lang.Object
docking.DialogComponentProvider
ghidra.app.util.datatype.DataTypeSelectionDialog
- All Implemented Interfaces:
- ActionContextProvider,- StatusListener,- TaskListener
- Direct Known Subclasses:
- ApplyEnumDialog
A dialog that allows the user to choose from available data types or create new ones.
- 
Field SummaryFields inherited from class docking.DialogComponentProviderapplyButton, buttonPanel, cancelButton, dismissButton, okButton, rootPanel
- 
Constructor SummaryConstructorsConstructorDescriptionDataTypeSelectionDialog(PluginTool pluginTool, DataTypeManager dtm, int maxSize, DataTypeParser.AllowedDataTypes allowedTypes) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidThe callback method for when the "Cancel" button is pressed.voidClears the last user selection.voidclose()protected DataTypeSelectionEditorcreateEditor(PluginTool tool, DataTypeParser.AllowedDataTypes allowedDataTypes) protected JComponentcreateEditorPanel(DataTypeSelectionEditor dtEditor) protected voidOverride this method if you want to do something when the dialog is made visibleThe data type choice of the user or null if the dialog was cancelled.protected voidThe callback method for when the "OK" button is pressed.voidsetInitialDataType(DataType dataType) Sets the value that this dialog will display in it's editor when initially shown.voidsetTabCommitsEdit(boolean doesCommit) If true then a Tab key press will work the same as pressing the Enter key.Methods inherited from class docking.DialogComponentProvideraddAction, addApplyButton, addButton, addCancelButton, addDismissButton, addOKButton, addWorkPanel, alertMessage, alertMessage, applyCallback, cancelCurrentTask, clearScheduledTask, clearStatusText, closeDialog, createSharedActions, dialogClosed, dismissCallback, dispose, 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, isDialogKeyBindingAction, isModal, isOKEnabled, isResizeable, isRunningTask, isShowing, isTransient, isVisible, notifyContextChanged, 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- 
DataTypeSelectionDialogpublic DataTypeSelectionDialog(PluginTool pluginTool, DataTypeManager dtm, int maxSize, DataTypeParser.AllowedDataTypes allowedTypes) 
 
- 
- 
Method Details- 
createEditorprotected DataTypeSelectionEditor createEditor(PluginTool tool, DataTypeParser.AllowedDataTypes allowedDataTypes) 
- 
createEditorPanel
- 
dialogShownprotected void dialogShown()Description copied from class:DialogComponentProviderOverride this method if you want to do something when the dialog is made visible- Overrides:
- dialogShownin class- DialogComponentProvider
 
- 
cancelCallbackprotected void cancelCallback()Description copied from class:DialogComponentProviderThe callback method for when the "Cancel" button is pressed. The default behavior is to call setVisible(false) and dispose() on the dialog.- Overrides:
- cancelCallbackin class- DialogComponentProvider
 
- 
okCallbackprotected void okCallback()Description copied from class:DialogComponentProviderThe callback method for when the "OK" button is pressed.- Overrides:
- okCallbackin class- DialogComponentProvider
 
- 
closepublic void close()- Overrides:
- closein class- DialogComponentProvider
 
- 
setTabCommitsEditpublic void setTabCommitsEdit(boolean doesCommit) If true then a Tab key press will work the same as pressing the Enter key. If false, then a Tab key press will trigger navigation, as is normally done in Java.This method is useful for widgets that have embedded editors that launch this dialog. For these editors, like tables, it is nice to be able to tab through various editors. This method allows these editors to keep this functionality, even though a new dialog was shown. - Parameters:
- doesCommit- true commits edits on Tab press
 
- 
setInitialDataTypeSets the value that this dialog will display in it's editor when initially shown.- Parameters:
- dataType- The initial data type to use for editing.
 
- 
clearUserChosenDataTypepublic void clearUserChosenDataType()Clears the last user selection. This is useful if this dialog is reused and the call wants to make sure that old selections do not appear later.
- 
getUserChosenDataTypeThe data type choice of the user or null if the dialog was cancelled.- Returns:
- The data type choice of the user or null if the dialog was cancelled.
 
- 
getEditor
 
-