Class AbstractLayoutProvider<V extends VisualVertex,E extends VisualEdge<V>,G extends VisualGraph<V,E>>

java.lang.Object
ghidra.graph.viewer.layout.AbstractLayoutProvider<V,E,G>
Type Parameters:
V - the vertex type
E - the edge type
G - the graph type
All Implemented Interfaces:
LayoutProvider<V,E,G>, LayoutProviderExtensionPoint<V,E,G>, ExtensionPoint
Direct Known Subclasses:
JungLayoutProvider

public abstract class AbstractLayoutProvider<V extends VisualVertex,E extends VisualEdge<V>,G extends VisualGraph<V,E>> extends Object implements LayoutProviderExtensionPoint<V,E,G>
A base implementation of LayoutProvider that stubs some default methods.

Some clients extends this class and adapt their graph to use one of the provided Jung layouts. Other clients will implement the interface of this class to create a custom layout.

  • Constructor Details

    • AbstractLayoutProvider

      public AbstractLayoutProvider()
  • Method Details

    • getActionIcon

      public Icon getActionIcon()
      Description copied from interface: LayoutProvider
      Returns an icon that can be used to show the provider a menu or toolbar. This may return null, as an icon is not a requirement.
      Specified by:
      getActionIcon in interface LayoutProvider<V extends VisualVertex,E extends VisualEdge<V>,G extends VisualGraph<V,E>>
      Returns:
      an icon that can be used to show the provider a menu or toolbar
    • getPriorityLevel

      public int getPriorityLevel()
      Description copied from interface: LayoutProvider
      Returns an arbitrary value that is relative to other LayoutProviders. The higher the value the more preferred the provider will be over other providers.
      Specified by:
      getPriorityLevel in interface LayoutProvider<V extends VisualVertex,E extends VisualEdge<V>,G extends VisualGraph<V,E>>
      Returns:
      the priority
    • initVertexLocations

      protected void initVertexLocations(G g, edu.uci.ics.jung.algorithms.layout.Layout<V,E> layout)
      Gives all vertices of the graph an initial, non-null location. This only works if the graph has been built before this method is called.

      Some graphs that have a layout will perform this same function as vertices are added.

      Parameters:
      g - the graph
      layout - the graph layout