Gephi Toolkit Javadoc

org.gephi.layout.api
Interface LayoutController

All Known Implementing Classes:
LayoutControllerImpl

public interface LayoutController

A LayoutController is the one responsible for controlling the states of the LayoutModel. It always controls the current workspace model.

This controller is a singleton and can therefore be found in Lookup:

LayoutController lc = Lookup.getDefault().lookup(LayoutController.class);

Author:
Mathieu Bastian

Method Summary
 boolean canExecute()
          Determine if the current Layout can be executed.
 boolean canStop()
          Determine if the current Layout execution can be stopped.
 void executeLayout()
          Executes the current Layout.
 void executeLayout(int numIterations)
          Executes the current layout for numIterations iterations.
 LayoutModel getModel()
          Returns the model of the currently selected Workspace.
 void setLayout(Layout layout)
          Sets the Layout to execute.
 void stopLayout()
          Stop the Layout's execution.
 

Method Detail

getModel

LayoutModel getModel()
Returns the model of the currently selected Workspace.


setLayout

void setLayout(Layout layout)
Sets the Layout to execute.

Parameters:
layout - the layout that is to be selected

executeLayout

void executeLayout()
Executes the current Layout.


executeLayout

void executeLayout(int numIterations)
Executes the current layout for numIterations iterations.

Parameters:
numIterations - the number of iterations of the algorithm

canExecute

boolean canExecute()
Determine if the current Layout can be executed.

Returns:
true if the layout is executable.

stopLayout

void stopLayout()
Stop the Layout's execution.


canStop

boolean canStop()
Determine if the current Layout execution can be stopped. If the current Layout is not running, it generally cannot be stopped.

Returns:
true if the layout can be stopped.

Gephi Toolkit Javadoc