Package ghidra.service.graph

# Class GraphActionContext

java.lang.Object
docking.DefaultActionContext
ghidra.service.graph.GraphActionContext

All Implemented Interfaces:
  `ActionContext`

Direct Known Subclasses:
  `EdgeGraphActionContext`, `VertexGraphActionContext`

public class GraphActionContext extends DefaultActionContext
The base ActionContext for the GraphDisplay instances.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GraphActionContext(ComponentProvider componentProvider, AttributedGraph graph, Set<AttributedVertex> selectedVertices, AttributedVertex locatedVertex)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AttributedVertex`
  `getFocusedVertex()`
  Returns the focused vertex (similar concept to the cursor in a text document)
  `AttributedGraph`
  `getGraph()`
  Returns the graph
  `Set<AttributedVertex>`
  `getSelectedVertices()`
  Returns the set of selectedVertices in the graph

  ### Methods inherited from class docking.DefaultActionContext

  `getComponentProvider, getContextObject, getEventClickModifiers, getMouseEvent, getSourceComponent, getSourceObject, hasAnyEventClickModifiers, setContextObject, setEventClickModifiers, setMouseEvent, setSourceObject, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### GraphActionContext

    public GraphActionContext(ComponentProvider componentProvider, AttributedGraph graph, Set<AttributedVertex> selectedVertices, AttributedVertex locatedVertex)

- ## Method Details

  - ### getGraph

    public AttributedGraph getGraph()
    Returns the graph
    Returns:
      the graph

  - ### getSelectedVertices

    public Set<AttributedVertex> getSelectedVertices()
    Returns the set of selectedVertices in the graph
    Returns:
      the set of selectedVertices in the graph

  - ### getFocusedVertex

    public AttributedVertex getFocusedVertex()
    Returns the focused vertex (similar concept to the cursor in a text document)
    Returns:
      the focused vertex