Package org.cy3sbml.styles
Class StyleManager
java.lang.Object
org.cy3sbml.styles.StyleManager
- All Implemented Interfaces:
org.cytoscape.event.CyListener,org.cytoscape.session.events.SessionLoadedListener
public class StyleManager
extends Object
implements org.cytoscape.session.events.SessionLoadedListener
Loads the visual styles of cy3sbml and their layout styles, at start and after a
session is loaded.
-
Constructor Summary
ConstructorsConstructorDescriptionStyleManager(org.cytoscape.task.read.LoadVizmapFileTaskFactory loadVizmapFileTaskFactory, org.cytoscape.view.vizmap.VisualMappingManager vmm, String[] styles, LayoutStyleFactory layoutStyleFactory) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.cytoscape.view.vizmap.VisualStylegetVisualStyleByName(org.cytoscape.view.vizmap.VisualMappingManager vmm, String styleName) Get the visual style by name.voidhandleEvent(org.cytoscape.session.events.SessionLoadedEvent e) Loads the styles missing in the loaded session.voidLoad the visual styles of the app and add the layout style of every style (#71), if they do not exist yet (e.g. from a session).
-
Constructor Details
-
StyleManager
public StyleManager(org.cytoscape.task.read.LoadVizmapFileTaskFactory loadVizmapFileTaskFactory, org.cytoscape.view.vizmap.VisualMappingManager vmm, String[] styles, LayoutStyleFactory layoutStyleFactory) - Parameters:
styles- names of the styles, loaded from the resourceslayoutStyleFactory- creates the layout style of every style
-
-
Method Details
-
loadStyles
public void loadStyles()Load the visual styles of the app and add the layout style of every style (#71), if they do not exist yet (e.g. from a session). -
getVisualStyleByName
public static org.cytoscape.view.vizmap.VisualStyle getVisualStyleByName(org.cytoscape.view.vizmap.VisualMappingManager vmm, String styleName) Get the visual style by name. If no style for given styleName exists, the default style is returned.This is a fix until the function is implemented on the vmm https://code.cytoscape.org/redmine/issues/2174
-
handleEvent
public void handleEvent(org.cytoscape.session.events.SessionLoadedEvent e) Loads the styles missing in the loaded session.- Specified by:
handleEventin interfaceorg.cytoscape.session.events.SessionLoadedListener
-