Package org.gephi.layout.api
Interface LayoutController
-
public interface LayoutControllerA LayoutController is the one responsible for controlling the states of theLayoutModel. 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanExecute()Determine if the current Layout can be executed.booleancanStop()Determine if the current Layout execution can be stopped.voidexecuteLayout()Executes the current Layout.voidexecuteLayout(int numIterations)Executes the current layout fornumIterationsiterations.LayoutModelgetModel()Returns the model of the currently selectedWorkspace.LayoutModelgetModel(Workspace workspace)Returns the model in the givenWorkspace.voidsetLayout(Layout layout)Sets the Layout to execute.voidstopLayout()Stop the Layout's execution.
-
-
-
Method Detail
-
getModel
LayoutModel getModel()
Returns the model of the currently selectedWorkspace.
-
getModel
LayoutModel getModel(Workspace workspace)
Returns the model in the givenWorkspace.- Parameters:
workspace- the workspace to lookup
-
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 fornumIterationsiterations.- Parameters:
numIterations- the number of iterations of the algorithm
-
canExecute
boolean canExecute()
Determine if the current Layout can be executed.- Returns:
trueif 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:
trueif the layout can be stopped.
-
-