Interface LayoutProvider<V extends VisualVertex,E extends VisualEdge<V>,G extends VisualGraph<V,E>>

Type Parameters:
V - the vertex type
E - the edge type
G - 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 Type
    Method
    Description
    Returns 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 provides
    Returns the name of this layout
    int
    Returns an arbitrary value that is relative to other LayoutProviders.
  • Method Details

    • 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 graph
      monitor - 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