Package ghidra.graph.viewer.layout
Interface LayoutProvider<V extends VisualVertex,E extends VisualEdge<V>,G extends VisualGraph<V,E>>
-
- Type Parameters:
V
- the vertex typeE
- the edge typeG
- the graph type
- All Superinterfaces:
ExtensionPoint
- All Known Implementing Classes:
AbstractLayoutProvider
,JungLayoutProvider
public interface LayoutProvider<V extends VisualVertex,E extends VisualEdge<V>,G extends VisualGraph<V,E>> extends ExtensionPoint
A layout provider createsVisualGraphLayout
instances. This class provides a name and icon for use in a UI. These features can be used to create a menu of layouts that may be applied.The pattern of usage for this class is for it to create the layout that it represents and then to apply the locations of that layout to the vertices (and edges, in the case of articulating edges) of the graph before returning the new layout.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ghidra.util.classfinder.ExtensionPoint
ExtensionPoint.Exclude, ExtensionPoint.Util
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.swing.Icon
getActionIcon()
Returns an icon that can be used to show the provider a menu or toolbar.VisualGraphLayout<V,E>
getLayout(G graph, TaskMonitor monitor)
Returns a new instance of the layout that this class providesjava.lang.String
getLayoutName()
Returns the name of this layoutint
getPriorityLevel()
Returns an arbitrary value that is relative to other LayoutProviders.
-
-
-
Method Detail
-
getLayout
VisualGraphLayout<V,E> getLayout(G graph, TaskMonitor monitor) throws CancelledException
Returns a new instance of the layout that this class provides- Parameters:
graph
- the graphmonitor
- a task monitor- Returns:
- the new layout
- Throws:
CancelledException
- if the monitor was cancelled
-
getLayoutName
java.lang.String getLayoutName()
Returns the name of this layout- Returns:
- the name of this layout
-
getActionIcon
javax.swing.Icon getActionIcon()
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.- Returns:
- an icon that can be used to show the provider a menu or toolbar
-
getPriorityLevel
int getPriorityLevel()
Returns an arbitrary value that is relative to other LayoutProviders. The higher the value the more preferred the provider will be over other providers.- Returns:
- the priority
-
-