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 type
E - the edge type
G - 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 VisualGraphs

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:

  • Constructor Details

    • VisualGraphComponentProvider

      protected VisualGraphComponentProvider(Tool tool, String name, String owner)
    • VisualGraphComponentProvider

      protected VisualGraphComponentProvider(Tool tool, String name, String owner, Class<?> contextType)
  • Method Details

    • 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 class ComponentProvider
    • componentShown

      public void componentShown()
      Description copied from class: ComponentProvider
      Notifies the provider that the component is being shown.
      Overrides:
      componentShown in class ComponentProvider
    • 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 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(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 interface ActionContextProvider
      Overrides:
      getActionContext in class ComponentProvider
      Parameters:
      event - popup event which corresponds to this request. May be null for key-stroke or other non-mouse event.