Package ghidra.graph
Class VisualGraphComponentProvider<V extends VisualVertex,E extends VisualEdge<V>,G extends VisualGraph<V,E>>
java.lang.Object
docking.ComponentProvider
ghidra.graph.VisualGraphComponentProvider<V,E,G>
- Type Parameters:
V
- the vertex typeE
- the edge typeG
- the graph type
- All Implemented Interfaces:
ActionContextProvider
,HelpDescriptor
public abstract class VisualGraphComponentProvider<V extends VisualVertex,E extends VisualEdge<V>,G extends VisualGraph<V,E>>
extends ComponentProvider
A base component provider for displaying
VisualGraph
s
This class will provide many optional sub-features, enabled as desired by calling the
various addXyzFeature()
methods.
Implementation Notes: to get full functionality, you must:
- Have your plugin call
readConfigState(SaveState)
andwriteConfigState(SaveState)
to save user settings. - Enable features you desire after calling your
ComponentProvider.addToTool()
method.
-
Field Summary
Fields inherited from class docking.ComponentProvider
DEFAULT_WINDOW_GROUP, dockingTool
-
Constructor Summary
ModifierConstructorDescriptionprotected
VisualGraphComponentProvider
(Tool tool, String name, String owner) protected
VisualGraphComponentProvider
(Tool tool, String name, String owner, Class<?> contextType) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Adds the satellite viewer functionality to this providervoid
Notifies the provider that the component is being hidden.void
Notifies the provider that the component is being shown.void
dispose()
To be called at the end of this provider's lifecyclegetActionContext
(MouseEvent event) Returns the context object which corresponds to the area of focus within this provider's component.protected ComponentProvider
abstract VisualGraphView
<V, E, G> getView()
You must return your graph view from this methodboolean
Returns true if the satellite is embedded in the graph view, whether it is showing or notboolean
Returns true if the satellite is showing, whether in the graph or undockedvoid
readConfigState
(SaveState saveState) Reads previously saved state from the given state objectvoid
writeConfigState
(SaveState saveState) Writes this providers saveable state to the given state objectMethods inherited from class docking.ComponentProvider
addLocalAction, addToTool, addToToolbar, adjustFontSize, canBeParent, closeComponent, componentActivated, componentDeactived, contextChanged, createContext, createContext, createContext, getBaseIcon, getComponent, getContextType, getDefaultWindowPosition, getHelpInfo, getHelpLocation, getHelpObject, getIcon, getInstanceID, getIntraGroupPosition, getLocalActions, getMappedName, getMappedOwner, getName, getOwner, getSubTitle, getTabText, getTitle, getTool, getWindowGroup, getWindowSubMenuName, initializeInstanceID, isActive, isFocusedProvider, isInTool, isSnapshot, isTransient, isVisible, registerAdjustableFontId, registerProviderNameOwnerChange, removeAllLocalActions, removeFromTool, removeLocalAction, requestFocus, resetFontSize, setCustomSubTitle, setCustomTabText, setCustomTitle, setDefaultFocusComponent, setDefaultWindowPosition, setHelpLocation, setIcon, setIntraGroupPosition, setKeyBinding, setSubTitle, setTabText, setTitle, setTransient, setVisible, setWindowGroup, setWindowMenuGroup, toFront, toString
-
Constructor Details
-
VisualGraphComponentProvider
-
VisualGraphComponentProvider
-
-
Method Details
-
getView
You must return your graph view from this method- Returns:
- your graph view
-
componentHidden
public void componentHidden()Description copied from class:ComponentProvider
Notifies the provider that the component is being hidden. This happens when the provider is being closed.- Overrides:
componentHidden
in classComponentProvider
-
componentShown
public void componentShown()Description copied from class:ComponentProvider
Notifies the provider that the component is being shown.- Overrides:
componentShown
in classComponentProvider
-
isSatelliteShowing
public boolean isSatelliteShowing()Returns true if the satellite is showing, whether in the graph or undocked- Returns:
- true if the satellite is showing, whether in the graph or undocked
-
isSatelliteDocked
public boolean isSatelliteDocked()Returns true if the satellite is embedded in the graph view, whether it is showing or not- Returns:
- true if the satellite is embedded in the graph view, whether it is showing or not
-
getSelectedVertices
-
getSatelliteProvider
-
addSatelliteFeature
protected void addSatelliteFeature()Adds the satellite viewer functionality to this provider -
dispose
public void dispose()To be called at the end of this provider's lifecycle -
writeConfigState
Writes this providers saveable state to the given state object- Parameters:
saveState
- the state object into which state is to be written
-
readConfigState
Reads previously saved state from the given state object- Parameters:
saveState
- the state object that may contain state information for this provider
-
getActionContext
Description copied from class:ComponentProvider
Returns the context object which corresponds to the area of focus within this provider's component. Null is returned when there is no context.- Specified by:
getActionContext
in interfaceActionContextProvider
- Overrides:
getActionContext
in classComponentProvider
- Parameters:
event
- popup event which corresponds to this request. May be null for key-stroke or other non-mouse event.
-