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
-
Method Summary
Modifier and TypeMethodDescriptionReturns an icon that can be used to show the provider a menu or toolbar.int
Returns an arbitrary value that is relative to other LayoutProviders.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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ghidra.graph.viewer.layout.LayoutProvider
getLayout, getLayoutName
-
Constructor Details
-
AbstractLayoutProvider
public AbstractLayoutProvider()
-
-
Method Details
-
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 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: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 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
-