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 Known Subinterfaces:
LayoutProviderExtensionPoint<V,
E, G>
- All Known Implementing Classes:
AbstractLayoutProvider
,JungLayoutProvider
public interface LayoutProvider<V extends VisualVertex,E extends VisualEdge<V>,G extends VisualGraph<V,E>>
A layout provider creates
VisualGraphLayout
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.
-
Method Summary
Modifier and TypeMethodDescriptionReturns an icon that can be used to show the provider a menu or toolbar.getLayout
(G graph, TaskMonitor monitor) Returns a new instance of the layout that this class providesReturns the name of this layoutint
Returns an arbitrary value that is relative to other LayoutProviders.
-
Method Details
-
getLayout
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
String getLayoutName()Returns the name of this layout- Returns:
- the name of this layout
-
getActionIcon
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
-