Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD

cytoscape.layout
Class CyLayouts

java.lang.Object
  extended by cytoscape.layout.CyLayouts

public class CyLayouts
extends Object

CyLayouts is a singleton class that is used to register all available layout algorithms.


Method Summary
static void addLayout(CyLayoutAlgorithm layout, String menu)
          Add a layout to the layout manager's list.
static Collection<CyLayoutAlgorithm> getAllLayouts()
          Get all of the available layouts.
static CyLayoutAlgorithm getDefaultLayout()
          Get the default layout.
static CyLayoutAlgorithm getLayout(String name)
          Get the layout named "name".
static String getMenuName(CyLayoutAlgorithm layout)
           
static void removeLayout(CyLayoutAlgorithm layout)
          Remove a layout from the layout maanger's list.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addLayout

public static void addLayout(CyLayoutAlgorithm layout,
                             String menu)
Add a layout to the layout manager's list. If menu is "null" it will be assigned to the "none" menu, which is not displayed. This can be used to register layouts that are to be used for specific algorithmic purposes, but not, in general, supposed to be for direct user use.

Parameters:
layout - The layout to be added
menu - The menu that this should appear under

removeLayout

public static void removeLayout(CyLayoutAlgorithm layout)
Remove a layout from the layout maanger's list.

Parameters:
layout - The layout to remove

getLayout

public static CyLayoutAlgorithm getLayout(String name)
Get the layout named "name". If "name" does not exist, this will return null

Parameters:
name - String representing the name of the layout
Returns:
the layout of that name or null if it is not reigstered

getAllLayouts

public static Collection<CyLayoutAlgorithm> getAllLayouts()
Get all of the available layouts.

Returns:
a Collection of all the available layouts

getDefaultLayout

public static CyLayoutAlgorithm getDefaultLayout()
Get the default layout. This is either the grid layout or a layout chosen by the user via the setting of the "layout.default" property.

Returns:
CyLayoutAlgorithm to use as the default layout algorithm

getMenuName

public static String getMenuName(CyLayoutAlgorithm layout)

www.cytoscape.org