Cytoscape 3.0.0-alpha8-SNAPSHOT API

org.cytoscape.view.layout
Class AbstractLayoutAlgorithmContext

java.lang.Object
  extended by org.cytoscape.view.layout.AbstractLayoutAlgorithmContext
All Implemented Interfaces:
CyLayoutContext
Direct Known Subclasses:
AbstractEdgeWeightedLayoutAlgorithmContext

public class AbstractLayoutAlgorithmContext
extends Object
implements CyLayoutContext


Field Summary
protected  CyNetwork network
           
protected  boolean selectedOnly
          Indicates that only selected nodes should be laid out.
protected  Set<View<CyNode>> staticNodes
          The set of nodes that are
 
Constructor Summary
AbstractLayoutAlgorithmContext(boolean supportsSelectedOnly, Set<Class<?>> supportedNodeAttributes, Set<Class<?>> supportedEdgeAttributes)
           
 
Method Summary
protected  void configureLayoutFromSubmenuSelection(ListSingleSelection<String> opts)
           
 CyNetworkView getNetworkView()
           
 Set<View<CyNode>> getStaticNodes()
           
 ListSingleSelection<String> getSubmenuOptions()
          Never use this method from within a layout to access the submenu options, instead call the configureLayoutFromSubmenuSelection() method to configure the layout based on menu selection.
 void initStaticNodes(CyNetworkView networkView)
          Descendants need to call this if they intend to use the "staticNodes" field.
 void setLayoutAttribute(String attributeName)
          Set the name of the attribute to use for attribute dependent layout algorithms.
 void setNetworkView(CyNetworkView networkView)
          Sets the network view to be laid out.
 void setSelectedOnly(boolean selectedOnly)
          Set the flag that indicates that this algorithm should only operate on the currently selected nodes.
 void setSubmenuOptions(ListSingleSelection<String> opts)
           
 boolean useSelectedOnly()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

staticNodes

protected Set<View<CyNode>> staticNodes
The set of nodes that are


selectedOnly

protected boolean selectedOnly
Indicates that only selected nodes should be laid out.


network

protected CyNetwork network
Constructor Detail

AbstractLayoutAlgorithmContext

public AbstractLayoutAlgorithmContext(boolean supportsSelectedOnly,
                                      Set<Class<?>> supportedNodeAttributes,
                                      Set<Class<?>> supportedEdgeAttributes)
Method Detail

getSubmenuOptions

public ListSingleSelection<String> getSubmenuOptions()
Never use this method from within a layout to access the submenu options, instead call the configureLayoutFromSubmenuSelection() method to configure the layout based on menu selection.

Returns:
The list single selection object that specifies the submenu names to be used for generating selection submenus.

setSubmenuOptions

public void setSubmenuOptions(ListSingleSelection<String> opts)

configureLayoutFromSubmenuSelection

protected void configureLayoutFromSubmenuSelection(ListSingleSelection<String> opts)

setNetworkView

public void setNetworkView(CyNetworkView networkView)
Sets the network view to be laid out.

Specified by:
setNetworkView in interface CyLayoutContext
Parameters:
networkView - the network view to be laid out.

getNetworkView

public CyNetworkView getNetworkView()
Specified by:
getNetworkView in interface CyLayoutContext

setLayoutAttribute

public void setLayoutAttribute(String attributeName)
Set the name of the attribute to use for attribute dependent layout algorithms.

Parameters:
attributeName - The name of the attribute

setSelectedOnly

public void setSelectedOnly(boolean selectedOnly)
Set the flag that indicates that this algorithm should only operate on the currently selected nodes.

Parameters:
selectedOnly - set to "true" if the algorithm should only apply to selected nodes only

useSelectedOnly

public boolean useSelectedOnly()

initStaticNodes

public final void initStaticNodes(CyNetworkView networkView)
Descendants need to call this if they intend to use the "staticNodes" field.


getStaticNodes

public Set<View<CyNode>> getStaticNodes()

Cytoscape 3.0.0-alpha8-SNAPSHOT API

Copyright 2011 Cytoscape Consortium. All rights reserved.