Class FunctionComparisonPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
ghidra.features.base.codecompare.panel.FunctionComparisonPanel
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ChangeListener
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear both sides of this panelvoiddispose()Remove all views in the tabbed panegetActionContext(MouseEvent event, ComponentProvider componentProvider) Returns the action context for a given mouse event and providerGet the actions for this FunctionComparisonPanelGets all actions for the FunctionComparisonPanel and all CodeComparisonPanels in this FunctionComparisonPanelGet the current code comparison panel being viewedGet the name of the current comparison panel being viewedGets a description to help distinguish this comparison panel from othersGets the currently displayed CodeComparisonPanelGets the ListingCodeComparisonPanel being displayed by this panel if one existsbooleanisEmpty()Returns true if the comparison window has no information to display in either the left or right panelfinal booleanDetermines if the layouts of the views are synchronized with respect to scrolling and locationvoidloadAddresses(Program leftProgram, Program rightProgram, AddressSetView leftAddresses, AddressSetView rightAddresses) Load the given addresses of the indicated programs into the views of this panelvoidloadComparisons(ComparisonData left, ComparisonData right) voidLoad the given data into the views of this panelvoidloadFunctions(Function leftFunction, Function rightFunction) Load the given functions into the views of this panelvoidprogramClosed(Program program) voidreadConfigState(String prefix, SaveState saveState) Sets up the FunctionComparisonPanel and which CodeComparisonPanel is currently displayed based on the specified saveStatebooleanSet the current tabbed panel to be the component with the given namevoidsetScrollingSyncState(boolean syncScrolling) Sets whether or not scrolling is synchronizedvoidsetTitlePrefixes(String leftTitlePrefix, String rightTitlePrefix) Sets the prefixes that are to be prepended to the title displayed for each side of each CodeComparisonPanelvoidvoidUpdates the enablement for all actions provided by each panelvoidwriteConfigState(String prefix, SaveState saveState) Saves the information to the save state about the FunctionComparisonPanel and which CodeComparisonPanel is currently displayedMethods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateMethods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeMethods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Constructor Details
-
FunctionComparisonPanel
-
-
Method Details
-
loadFunctions
Load the given functions into the views of this panel- Parameters:
leftFunction- The function for the left side of the panelrightFunction- The function for the right side of the panel
-
loadData
Load the given data into the views of this panel- Parameters:
leftData- The data for the left side of the panelrightData- The data for the right side of the panel
-
loadComparisons
-
loadAddresses
public void loadAddresses(Program leftProgram, Program rightProgram, AddressSetView leftAddresses, AddressSetView rightAddresses) Load the given addresses of the indicated programs into the views of this panel- Parameters:
leftProgram- the program for the left side of the panelrightProgram- the program for the right side of the panelleftAddresses- addresses for the info to display in the left side of the panelrightAddresses- addresses for the info to display in the right side of the panel
-
getActions
Get the actions for this FunctionComparisonPanel- Returns:
- an array containing the actions
-
getDescription
Gets a description to help distinguish this comparison panel from others- Returns:
- the description
-
clear
public void clear()Clear both sides of this panel -
isEmpty
public boolean isEmpty()Returns true if the comparison window has no information to display in either the left or right panel- Returns:
- true if the comparison window has no information to display
-
getDualListingPanel
Gets the ListingCodeComparisonPanel being displayed by this panel if one exists- Returns:
- the comparison panel or null
-
stateChanged
- Specified by:
stateChangedin interfaceChangeListener
-
setCurrentTabbedComponent
Set the current tabbed panel to be the component with the given name- Parameters:
name- name of view to set as the current tab- Returns:
- true if the named view was found in the provider map
-
getCurrentComponentName
Get the name of the current comparison panel being viewed- Returns:
- the tab name, or null if there is nothing selected
-
dispose
public void dispose()Remove all views in the tabbed pane -
programClosed
-
getCodeComparisonPanelByName
-
readConfigState
Sets up the FunctionComparisonPanel and which CodeComparisonPanel is currently displayed based on the specified saveState- Parameters:
prefix- identifier to prepend to any save state names to make them uniquesaveState- the save state for retrieving information
-
writeConfigState
Saves the information to the save state about the FunctionComparisonPanel and which CodeComparisonPanel is currently displayed- Parameters:
prefix- identifier to prepend to any save state names to make them uniquesaveState- the save state where the information gets written
-
getCodeComparisonActions
Gets all actions for the FunctionComparisonPanel and all CodeComparisonPanels in this FunctionComparisonPanel- Returns:
- the code comparison actions
-
setTitlePrefixes
Sets the prefixes that are to be prepended to the title displayed for each side of each CodeComparisonPanel- Parameters:
leftTitlePrefix- the prefix to prepend to the left titlesrightTitlePrefix- the prefix to prepend to the right titles
-
getActionContext
Returns the action context for a given mouse event and provider- Parameters:
event- the mouse eventcomponentProvider- the component provider- Returns:
- the action context
-
isScrollingSynced
public final boolean isScrollingSynced()Determines if the layouts of the views are synchronized with respect to scrolling and location- Returns:
- true if scrolling is synchronized between the two views
-
setScrollingSyncState
public void setScrollingSyncState(boolean syncScrolling) Sets whether or not scrolling is synchronized- Parameters:
syncScrolling- true means synchronize scrolling and location between the two views
-
getDisplayedPanel
Gets the currently displayed CodeComparisonPanel- Returns:
- the current panel or null.
-
updateActionEnablement
public void updateActionEnablement()Updates the enablement for all actions provided by each panel -
getCurrentComponent
Get the current code comparison panel being viewed- Returns:
- null if there is no code comparison panel
-
getComparisonPanels
-