Package ghidra.graph.support
Class TestLayoutProvider
- java.lang.Object
-
- ghidra.graph.support.TestLayoutProvider
-
- All Implemented Interfaces:
LayoutProvider<AbstractTestVertex,TestEdge,TestVisualGraph>
,ExtensionPoint
public class TestLayoutProvider extends java.lang.Object implements LayoutProvider<AbstractTestVertex,TestEdge,TestVisualGraph>
A layout provider used for testing.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ghidra.util.classfinder.ExtensionPoint
ExtensionPoint.Exclude, ExtensionPoint.Util
-
-
Constructor Summary
Constructors Constructor Description TestLayoutProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected edu.uci.ics.jung.algorithms.layout.Layout<AbstractTestVertex,TestEdge>
createJungLayout(TestVisualGraph g)
javax.swing.Icon
getActionIcon()
Returns an icon that can be used to show the provider a menu or toolbar.TestGraphLayout
getLayout(TestVisualGraph g, 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
public TestGraphLayout getLayout(TestVisualGraph g, TaskMonitor monitor) throws CancelledException
Description copied from interface:LayoutProvider
Returns a new instance of the layout that this class provides- Specified by:
getLayout
in interfaceLayoutProvider<AbstractTestVertex,TestEdge,TestVisualGraph>
- Parameters:
g
- the graphmonitor
- a task monitor- Returns:
- the new layout
- Throws:
CancelledException
- if the monitor was cancelled
-
createJungLayout
protected edu.uci.ics.jung.algorithms.layout.Layout<AbstractTestVertex,TestEdge> createJungLayout(TestVisualGraph g)
-
getLayoutName
public java.lang.String getLayoutName()
Description copied from interface:LayoutProvider
Returns the name of this layout- Specified by:
getLayoutName
in interfaceLayoutProvider<AbstractTestVertex,TestEdge,TestVisualGraph>
- Returns:
- the name of this layout
-
getActionIcon
public javax.swing.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 interfaceLayoutProvider<AbstractTestVertex,TestEdge,TestVisualGraph>
- 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<AbstractTestVertex,TestEdge,TestVisualGraph>
- Returns:
- the priority
-
-