Package org.cy3sbml.layout
Class LayoutTools
java.lang.Object
org.cy3sbml.layout.LayoutTools
Utilities for working with layouts.
Saves the node positions of a network view to a file and applies them to a network view.
The nodes are matched by their cyId, which is unique for every node of an SBML
network and the same in every import of the model, also for the nodes of elements without
SBML id (rules, kinetic laws, units, math, ...). The positions of old layout files, which
have only the SBML id, are matched by the SBML id. The glyph nodes of a layout network, where
the glyphs of one element (aliases) have the same cyId, are matched by the glyph.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintloadLayoutForViewFromFile(org.cytoscape.view.model.CyNetworkView view, File file) Moves every node of the view with a position in the file to that position.voidLoad layout of current view from file.voidSave layout of current view in file.intsaveLayoutOfViewInFile(org.cytoscape.view.model.CyNetworkView view, File file) Save layout of given view in file.
-
Constructor Details
-
LayoutTools
-
-
Method Details
-
saveLayoutOfCurrentViewInFile
Save layout of current view in file.- Throws:
IOException- if the file could not be written
-
saveLayoutOfViewInFile
public int saveLayoutOfViewInFile(org.cytoscape.view.model.CyNetworkView view, File file) throws IOException Save layout of given view in file. Nodes without cyId and SBML id (not created by cy3sbml) are not saved.- Returns:
- the number of saved node positions
- Throws:
IOException- if the file could not be written
-
loadLayoutOfCurrentViewFromFile
Load layout of current view from file. -
loadLayoutForViewFromFile
Moves every node of the view with a position in the file to that position.- Returns:
- number of positioned nodes
-