Cytoscape 3.0.0-alpha8-SNAPSHOT API

org.cytoscape.view.layout
Interface CyLayoutAlgorithm<T extends CyLayoutContext>

All Known Implementing Classes:
AbstractLayoutAlgorithm

public interface CyLayoutAlgorithm<T extends CyLayoutContext>

An extension of NetworkViewTaskFactory specific to layout algorithms.


Cytoscape Backwards Compatibility (SPI Interface): We expect that this interface will be implemented. Therefore to maintain backwards compatibility this interface will only be modified for major version updates.

Method Summary
 T createLayoutContext()
           
 TaskIterator createTaskIterator(T layoutContext)
           
 List<String> getInitialAttributeList()
          This returns a (possibly empty) List of Strings that is used for the attribute list in the menu for attribute-based layouts.
 String getName()
          Returns the computer-readable name of the layout.
 boolean isReady(T layoutContext)
           
 Set<Class<?>> supportsEdgeAttributes()
          Tests to see if this layout supports doing a layout based on edge attributes.
 Set<Class<?>> supportsNodeAttributes()
          Tests to see if this layout supports doing a layout based on node attributes.
 boolean supportsSelectedOnly()
          Tests to see if this layout supports doing a layout on a subset of the nodes in this network view.
 

Method Detail

createTaskIterator

TaskIterator createTaskIterator(T layoutContext)

isReady

boolean isReady(T layoutContext)

createLayoutContext

T createLayoutContext()

supportsSelectedOnly

boolean supportsSelectedOnly()
Tests to see if this layout supports doing a layout on a subset of the nodes in this network view.

Returns:
true if layout supports layouts on a subset of the nodes

supportsNodeAttributes

Set<Class<?>> supportsNodeAttributes()
Tests to see if this layout supports doing a layout based on node attributes.

Returns:
byte array of allowable attribute types or "null" if not supported. If the first type is "-1", all types are supported

supportsEdgeAttributes

Set<Class<?>> supportsEdgeAttributes()
Tests to see if this layout supports doing a layout based on edge attributes.

Returns:
type array of allowable attribute types or "null" if not supported. If the first type is "-1", all types are supported

getInitialAttributeList

List<String> getInitialAttributeList()
This returns a (possibly empty) List of Strings that is used for the attribute list in the menu for attribute-based layouts. This allows layout algorithms to provide "special" attributes. For example, a force directed layout might want to set the list to ["(unweighted)"] to allow the user to perform an unweighted layout. Note that this value will be set using setLayoutAttribute() just like other attributes, so the layout algorithm will need to check for it.

Returns:
List of column names (i.e. attributes) used for attribute-based layouts.

getName

String getName()
Returns the computer-readable name of the layout. To get a human readable name, use toString().

Returns:
The computer-readable name of the layout.

Cytoscape 3.0.0-alpha8-SNAPSHOT API

Copyright 2011 Cytoscape Consortium. All rights reserved.