Interface GraphDisplayBroker


  • public interface GraphDisplayBroker
    Ghidra service interface for managing and directing graph output. It purpose is to discover available graphing display providers and (if more than one) allow the user to select the currently active graph consumer. Clients that generate graphs don't have to worry about how to display them or export graphs. They simply send their graphs to the broker and register for graph events if they want interactive support.
    • Method Detail

      • getDefaultGraphDisplayProvider

        GraphDisplayProvider getDefaultGraphDisplayProvider()
        Gets the currently active GraphDisplayProvider that will be used to display/export graphs
        Returns:
        the currently active GraphDisplayProvider
      • addGraphDisplayBrokerListener

        void addGraphDisplayBrokerListener​(ghidra.app.plugin.core.graph.GraphDisplayBrokerListener listener)
        Adds a listener for notification when the set of graph display providers change or the currently active graph display provider changes
        Parameters:
        listener - the listener to be notified
      • removeGraphDisplayBrokerLisetener

        void removeGraphDisplayBrokerLisetener​(ghidra.app.plugin.core.graph.GraphDisplayBrokerListener listener)
        Removes the given listener
        Parameters:
        listener - the listener to no longer be notified of changes
      • getDefaultGraphDisplay

        GraphDisplay getDefaultGraphDisplay​(boolean reuseGraph,
                                            TaskMonitor monitor)
                                     throws GraphException
        A convenience method for getting a GraphDisplay from the currently active provider
        Parameters:
        reuseGraph - if true, the provider will attempt to re-use a current graph display
        monitor - the TaskMonitor that can be used to cancel the operation
        Returns:
        a GraphDisplay object to sends graphs to be displayed or exported.
        Throws:
        GraphException - thrown if an error occurs trying to get a graph display
      • hasDefaultGraphDisplayProvider

        boolean hasDefaultGraphDisplayProvider()
        Checks if there is at least one GraphDisplayProvider in the system.
        Returns:
        true if there is at least one GraphDisplayProvider
      • getGraphDisplayProvider

        GraphDisplayProvider getGraphDisplayProvider​(java.lang.String name)
        Gets the GraphDisplayProvider with the given name
        Parameters:
        name - the name of the GraphDisplayProvider to get
        Returns:
        the GraphDisplayProvider with the given name or null if none with that name exists.
      • getGraphExporters

        AttributedGraphExporter getGraphExporters​(java.lang.String name)
        Returns the AttributedGraphExporter with the given name or null in no exporter with that name is known
        Parameters:
        name - the name of the exporter to retrieve
        Returns:
        the AttributedGraphExporter with the given name or null if no exporter with that name is known