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 displayingVisualGraph
sThis 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
Constructors Modifier Constructor Description protected
VisualGraphComponentProvider(Tool tool, java.lang.String name, java.lang.String owner)
protected
VisualGraphComponentProvider(Tool tool, java.lang.String name, java.lang.String owner, java.lang.Class<?> contextType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addSatelliteFeature()
Adds the satellite viewer functionality to this providervoid
componentHidden()
Notifies the provider that the component is being hidden.void
componentShown()
Notifies the provider that the component is being shown.void
dispose()
To be called at the end of this provider's lifecycleActionContext
getActionContext(java.awt.event.MouseEvent event)
Returns the context object which corresponds to the area of focus within this provider's component.protected ComponentProvider
getSatelliteProvider()
java.util.Set<V>
getSelectedVertices()
abstract VisualGraphView<V,E,G>
getView()
You must return your graph view from this methodboolean
isSatelliteDocked()
Returns true if the satellite is embedded in the graph view, whether it is showing or notboolean
isSatelliteShowing()
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 object-
Methods inherited from class docking.ComponentProvider
addLocalAction, addToTool, addToToolbar, closeComponent, componentActivated, componentDeactived, contextChanged, createContext, createContext, createContext, getComponent, getContextType, getDefaultWindowPosition, getHelpInfo, getHelpLocation, getHelpObject, getIcon, getInstanceID, getIntraGroupPosition, getMappedName, getMappedOwner, getName, getOwner, getSubTitle, getTabText, getTitle, getTool, getWindowGroup, getWindowSubMenuName, initializeInstanceID, isActive, isFocusedProvider, isInTool, isSnapshot, isTransient, isVisible, registerProviderNameOwnerChange, removeAllLocalActions, removeFromTool, removeLocalAction, requestFocus, setDefaultWindowPosition, setHelpLocation, setIcon, setIntraGroupPosition, setKeyBinding, setSubTitle, setTabText, setTitle, setTransient, setVisible, setWindowGroup, setWindowMenuGroup, toFront, toString
-
-
-
-
Constructor Detail
-
VisualGraphComponentProvider
protected VisualGraphComponentProvider(Tool tool, java.lang.String name, java.lang.String owner)
-
VisualGraphComponentProvider
protected VisualGraphComponentProvider(Tool tool, java.lang.String name, java.lang.String owner, java.lang.Class<?> contextType)
-
-
Method Detail
-
getView
public abstract VisualGraphView<V,E,G> 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
public java.util.Set<V> getSelectedVertices()
-
getSatelliteProvider
protected ComponentProvider 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
public void writeConfigState(SaveState saveState)
Writes this providers saveable state to the given state object- Parameters:
saveState
- the state object into which state is to be written
-
readConfigState
public void readConfigState(SaveState saveState)
Reads previously saved state from the given state object- Parameters:
saveState
- the state object that may contain state information for this provider
-
getActionContext
public ActionContext getActionContext(java.awt.event.MouseEvent event)
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.
-
-