Package ghidra.framework.main
Class OpenVersionedFileDialog
- java.lang.Object
-
- docking.DialogComponentProvider
-
- ghidra.framework.main.DataTreeDialog
-
- ghidra.framework.main.OpenVersionedFileDialog
-
- All Implemented Interfaces:
ActionContextProvider
,GTreeSelectionListener
,StatusListener
,TaskListener
,java.awt.event.ActionListener
,java.util.EventListener
public class OpenVersionedFileDialog extends DataTreeDialog
Dialog to open a file that is versioned and allow a version to be opened.
-
-
Field Summary
-
Fields inherited from class ghidra.framework.main.DataTreeDialog
CHOOSE_FOLDER, CREATE, HEIGHT, OPEN, SAVE, treePanel, WIDTH
-
Fields inherited from class docking.DialogComponentProvider
applyButton, cancelButton, dismissButton, okButton, rootPanel
-
-
Constructor Summary
Constructors Constructor Description OpenVersionedFileDialog(PluginTool tool, java.lang.String title, DomainFileFilter filter)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addTreeListeners()
protected javax.swing.JPanel
buildMainPanel()
Define the Main panel for the dialog here.void
close()
protected void
dialogClosed()
Override this method if you want to do something when the dialog is made invisibleprotected void
dialogShown()
Override this method if you want to do something when the dialog is made visibleActionContext
getActionContext(java.awt.event.MouseEvent event)
An optional extension point for subclasses to provider action context for the actions used by this provider.int
getVersion()
Return the selected version number from the history panel.DomainObject
getVersionedDomainObject(java.lang.Object consumer, boolean readOnly)
Get the domain object for the selected version.-
Methods inherited from class ghidra.framework.main.DataTreeDialog
actionPerformed, addOkActionListener, cancelCallback, findAndSelect, getDomainFile, getDomainFolder, getNameText, okCallback, selectDomainFile, selectRootDataFolder, setNameText, setSearchText, setSelectedFolder, setTreeSelectionMode, showComponent, valueChanged, wasCancelled
-
Methods inherited from class docking.DialogComponentProvider
addAction, addApplyButton, addButton, addCancelButton, addDismissButton, addOKButton, addWorkPanel, alertMessage, alertMessage, applyCallback, cancelCurrentTask, clearScheduledTask, clearStatusText, dismissCallback, doInitialize, escapeCallback, executeProgressTask, getActions, getBackground, getBounds, getComponent, getDefaultButton, getDefaultSize, getDialogSize, getFocusComponent, getGlassPane, getHelpLocatdion, getIntialLocation, getLocationOnScreen, getPreferredSize, getRemberSize, getRememberLocation, getStatusLabel, getStatusText, getTaskMonitorComponent, getTaskScheduler, getTitle, getUseSharedLocation, hideTaskMonitorComponent, isApplyEnabled, isCancelEnabled, isModal, isOKEnabled, isResizeable, isRunningTask, isShowing, isTransient, isVisible, main, 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
-
OpenVersionedFileDialog
public OpenVersionedFileDialog(PluginTool tool, java.lang.String title, DomainFileFilter filter)
Constructor- Parameters:
tool
- tool where the file is being opened.title
- title to usefilter
- filter used to control what is displayed in data tree.
-
-
Method Detail
-
getVersionedDomainObject
public DomainObject getVersionedDomainObject(java.lang.Object consumer, boolean readOnly)
Get the domain object for the selected version.- Parameters:
consumer
- consumerreadOnly
- true if the domain object should be opened read only, versus immutable- Returns:
- null if a versioned file was not selected
-
getVersion
public int getVersion()
Return the selected version number from the history panel.- Returns:
- -1 if a version history was not selected
-
buildMainPanel
protected javax.swing.JPanel buildMainPanel()
Description copied from class:DataTreeDialog
Define the Main panel for the dialog here.- Overrides:
buildMainPanel
in classDataTreeDialog
- Returns:
- JPanel the completed
Main Panel<\CODE>
-
close
public void close()
- Overrides:
close
in classDataTreeDialog
-
dialogShown
protected void dialogShown()
Description copied from class:DialogComponentProvider
Override this method if you want to do something when the dialog is made visible- Overrides:
dialogShown
in classDataTreeDialog
-
dialogClosed
protected void dialogClosed()
Description copied from class:DialogComponentProvider
Override this method if you want to do something when the dialog is made invisible- Overrides:
dialogClosed
in classDialogComponentProvider
-
addTreeListeners
protected void addTreeListeners()
- Overrides:
addTreeListeners
in classDataTreeDialog
-
getActionContext
public ActionContext getActionContext(java.awt.event.MouseEvent event)
Description copied from class:DialogComponentProvider
An optional extension point for subclasses to provider action context for the actions used by this provider.- Specified by:
getActionContext
in interfaceActionContextProvider
- Overrides:
getActionContext
in classDataTreeDialog
- Parameters:
event
- The mouse event used (may be null) to generate a popup menu
-
-