Package org.gephi.layout.api
Interface LayoutController
-
public interface LayoutController
A 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 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 fornumIterations
iterations.LayoutModel
getModel()
Returns the model of the currently selectedWorkspace
.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 selectedWorkspace
.
-
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 fornumIterations
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.
-
-