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 displayingVisualGraphsThis 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 protectedVisualGraphComponentProvider(DockingTool tool, java.lang.String name, java.lang.String owner)protectedVisualGraphComponentProvider(DockingTool 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 voidaddSatelliteFeature()Adds the satellite viewer functionality to this providervoidcomponentHidden()Notifies the provider that the component is being hidden.voidcomponentShown()Notifies the provider that the component is being shown.voiddispose()To be called at the end of this provider's lifecycleActionContextgetActionContext(java.awt.event.MouseEvent event)Returns the context object which corresponds to the area of focus within this provider's component.protected ComponentProvidergetSatelliteProvider()java.util.Set<V>getSelectedVertices()abstract VisualGraphView<V,E,G>getView()You must return your graph view from this methodbooleanisSatelliteDocked()Returns true if the satellite is embedded in the graph view, whether it is showing or notbooleanisSatelliteShowing()Returns true if the satellite is showing, whether in the graph or undockedvoidreadConfigState(SaveState saveState)Reads previously saved state from the given state objectvoidwriteConfigState(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, removeFromTool, removeLocalAction, requestFocus, setDefaultWindowPosition, setHelpLocation, setIcon, setIntraGroupPosition, setKeyBinding, setSubTitle, setTabText, setTitle, setTransient, setVisible, setWindowGroup, setWindowMenuGroup, toFront, toString
-
-
-
-
Constructor Detail
-
VisualGraphComponentProvider
protected VisualGraphComponentProvider(DockingTool tool, java.lang.String name, java.lang.String owner)
-
VisualGraphComponentProvider
protected VisualGraphComponentProvider(DockingTool 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:ComponentProviderNotifies the provider that the component is being hidden. This happens when the provider is being closed.- Overrides:
componentHiddenin classComponentProvider
-
componentShown
public void componentShown()
Description copied from class:ComponentProviderNotifies the provider that the component is being shown.- Overrides:
componentShownin 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:ComponentProviderReturns 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:
getActionContextin interfaceActionContextProvider- Overrides:
getActionContextin classComponentProvider- Parameters:
event- popup event which corresponds to this request. May be null for key-stroke or other non-mouse event.
-
-