weka.gui.graphvisualizer

## Interface LayoutEngine

- All Known Implementing Classes:
    HierarchicalBCEngine

      public interface LayoutEngine

  This interface class has been added to facilitate the addition of other layout engines to this package. Any class that wants to lay out a graph should implement this interface.
  Version:
    $Revision: 10153 $ - 24 Apr 2003 - Initial version (Ashraf M. Kibriya)
  Author:
    Ashraf M. Kibriya (amk14@cs.waikato.ac.nz)

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addLayoutCompleteEventListener(LayoutCompleteEventListener e)` This method adds a LayoutCompleteEventListener to the LayoutEngine.
    `void` | `fireLayoutCompleteEvent(LayoutCompleteEvent e)` This fires a LayoutCompleteEvent once a layout has been completed.
    `javax.swing.JPanel` | `getControlPanel()` This method returns the extra controls panel for the LayoutEngine, if there is any.
    `java.util.ArrayList<GraphNode>` | `getNodes()` give access to set of graph nodes
    `javax.swing.JProgressBar` | `getProgressBar()` This method returns the progress bar for the LayoutEngine, which shows the progress of the layout process, if it takes a while to layout the graph
    `void` | `layoutGraph()` This method lays out the graph for better visualization
    `void` | `removeLayoutCompleteEventListener(LayoutCompleteEventListener e)` This method removes a LayoutCompleteEventListener from the LayoutEngine.
    `void` | `setNodesEdges(java.util.ArrayList<GraphNode> nodes, java.util.ArrayList<GraphEdge> edges)` This method sets the nodes and edges vectors of the LayoutEngine
    `void` | `setNodeSize(int nodeWidth, int nodeHeight)` This method sets the allowed size of the node

- - ### Method Detail

    - #### layoutGraph

          void layoutGraph()

      This method lays out the graph for better visualization

    - #### setNodesEdges

          void setNodesEdges(java.util.ArrayList<GraphNode> nodes,
                             java.util.ArrayList<GraphEdge> edges)

      This method sets the nodes and edges vectors of the LayoutEngine

    - #### setNodeSize

          void setNodeSize(int nodeWidth,
                           int nodeHeight)

      This method sets the allowed size of the node

    - #### getNodes

          java.util.ArrayList<GraphNode> getNodes()

      give access to set of graph nodes

    - #### getControlPanel

          javax.swing.JPanel getControlPanel()

      This method returns the extra controls panel for the LayoutEngine, if there is any.

    - #### getProgressBar

          javax.swing.JProgressBar getProgressBar()

      This method returns the progress bar for the LayoutEngine, which shows the progress of the layout process, if it takes a while to layout the graph

    - #### addLayoutCompleteEventListener

          void addLayoutCompleteEventListener(LayoutCompleteEventListener e)

      This method adds a LayoutCompleteEventListener to the LayoutEngine.
      Parameters:
        `e` - - The LayoutCompleteEventListener to add

    - #### removeLayoutCompleteEventListener

          void removeLayoutCompleteEventListener(LayoutCompleteEventListener e)

      This method removes a LayoutCompleteEventListener from the LayoutEngine.
      Parameters:
        `e` - - The LayoutCompleteEventListener to remove.

    - #### fireLayoutCompleteEvent

          void fireLayoutCompleteEvent(LayoutCompleteEvent e)

      This fires a LayoutCompleteEvent once a layout has been completed.