public abstract class AbstractLayoutAlgorithm extends Object implements CyLayoutAlgorithm
Module: layout-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>layout-api</artifactId> </dependency>
Modifier and Type | Field and Description |
---|---|
protected UndoSupport |
undoSupport
An undo support object available for use
|
ALL_NODE_VIEWS
Constructor and Description |
---|
AbstractLayoutAlgorithm(String computerName,
String humanName,
UndoSupport undoSupport)
The Constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
createLayoutContext()
Returns a new layout context object.
|
Object |
getDefaultLayoutContext()
Returns the default instance of the layout context.
|
String |
getName()
Returns the computer-readable name of the layout.
|
Set<Class<?>> |
getSupportedEdgeAttributeTypes()
Returns the set of node attribute types potentially used by this layout algorithm.
|
Set<Class<?>> |
getSupportedNodeAttributeTypes()
Returns the set of node attribute types potentially used by this layout algorithm.
|
boolean |
getSupportsSelectedOnly()
Returns true if this algorithm supports being applied to only the currently selected nodes.
|
boolean |
isReady(CyNetworkView view,
Object tunableContext,
Set<View<CyNode>> nodesToLayout,
String attributeName)
Returns true if the task factory is ready to produce a task iterator.
|
String |
toString()
Returns the human-readable name of the layout.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createTaskIterator
protected final UndoSupport undoSupport
public AbstractLayoutAlgorithm(String computerName, String humanName, UndoSupport undoSupport)
computerName
- a computer readable name used to construct property strings.humanName
- a user visible name of the layout.public Object createLayoutContext()
CyLayoutAlgorithm
createLayoutContext
in interface CyLayoutAlgorithm
public final Object getDefaultLayoutContext()
CyLayoutAlgorithm
getDefaultLayoutContext
in interface CyLayoutAlgorithm
public String getName()
CyLayoutAlgorithm
getName
in interface CyLayoutAlgorithm
public String toString()
CyLayoutAlgorithm
toString
in interface CyLayoutAlgorithm
toString
in class Object
public Set<Class<?>> getSupportedNodeAttributeTypes()
CyLayoutAlgorithm
getSupportedNodeAttributeTypes
in interface CyLayoutAlgorithm
public Set<Class<?>> getSupportedEdgeAttributeTypes()
CyLayoutAlgorithm
getSupportedEdgeAttributeTypes
in interface CyLayoutAlgorithm
public boolean getSupportsSelectedOnly()
CyLayoutAlgorithm
getSupportsSelectedOnly
in interface CyLayoutAlgorithm
public boolean isReady(CyNetworkView view, Object tunableContext, Set<View<CyNode>> nodesToLayout, String attributeName)
CyLayoutAlgorithm
isReady
in interface CyLayoutAlgorithm
view
- The network view that the layout algorithm should be applied to.tunableContext
- The layout context for this layout algorithm.nodesToLayout
- The set of node views to layout.attributeName
- The possibly null name of the attribute to use for this layout.Copyright 2011-2015 Cytoscape Consortium. All rights reserved.