Package ghidra.graph.viewer.layout
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 typeE- the edge typeG- 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns an icon that can be used to show the provider a menu or toolbar.intReturns an arbitrary value that is relative to other LayoutProviders.protected voidinitVertexLocations(G g, edu.uci.ics.jung.algorithms.layout.Layout<V, E> layout) Gives all vertices of the graph an initial, non-null location.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.graph.viewer.layout.LayoutProvider
getLayout, getLayoutName
-
Constructor Details
-
AbstractLayoutProvider
public AbstractLayoutProvider()
-
-
Method Details
-
getActionIcon
Description copied from interface:LayoutProviderReturns 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:
getActionIconin interfaceLayoutProvider<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:LayoutProviderReturns 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:
getPriorityLevelin interfaceLayoutProvider<V extends VisualVertex,E extends VisualEdge<V>, G extends VisualGraph<V, E>> - Returns:
- the priority
-
initVertexLocations
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 graphlayout- the graph layout
-