org.gephi.layout.plugin
Class AbstractLayout
java.lang.Object
org.gephi.layout.plugin.AbstractLayout
- All Implemented Interfaces:
- Layout
- Direct Known Subclasses:
- ForceAtlasLayout, FruchtermanReingold, LabelAdjust, MultiLevelLayout, RandomLayout, RotateLayout, ScaleLayout, Test.TestLayout, YifanHuLayout
public abstract class AbstractLayout
- extends java.lang.Object
- implements Layout
Base class for layout algorithms.
- Author:
- Helder Suzuki
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
graphModel
protected GraphModel graphModel
dynamicModel
protected DynamicModel dynamicModel
AbstractLayout
public AbstractLayout(LayoutBuilder layoutBuilder)
getBuilder
public LayoutBuilder getBuilder()
- Description copied from interface:
Layout
- The reference to the LayoutBuilder that instanciated this Layout.
- Specified by:
getBuilder
in interface Layout
- Returns:
- the reference to the builder that builts this instance
setGraphModel
public void setGraphModel(GraphModel graphModel)
- Description copied from interface:
Layout
- Injects the graph model for the graph this Layout should operate on.
It's preferable to get visible graph to perform on visualization.
- Specified by:
setGraphModel
in interface Layout
- Parameters:
graphModel
- the graph model that the layout is to be working on
canAlgo
public boolean canAlgo()
- Description copied from interface:
Layout
- Tests if the algorithm can run, called before each pass.
- Specified by:
canAlgo
in interface Layout
- Returns:
true
if the algorithm can run,
false
otherwise
setConverged
public void setConverged(boolean converged)
isConverged
public boolean isConverged()