public class StyleManager extends Object implements org.cytoscape.session.events.SessionAboutToBeSavedListener, org.cytoscape.session.events.SessionLoadedListener, GraphicsChangedListener
Constructor and Description |
---|
StyleManager(ImageStorage imf,
org.cytoscape.view.vizmap.VisualMappingManager vmmServiceRef,
org.cytoscape.view.model.CyNetworkViewManager cyNetViewMgr,
org.cytoscape.event.CyEventHelper eventHelper,
NodeManager nm,
org.cytoscape.application.CyApplicationManager cyAppMgr,
ActiveNodeManager anm)
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addNodes(org.cytoscape.work.TaskMonitor monitor)
Add nodes to the currently used Style, and update the TaskMonitor to indicate the current activity.
|
void |
addNodesToStyleDuringLoad(org.cytoscape.work.TaskMonitor monitor,
org.cytoscape.view.vizmap.VisualStyle styleToModify)
Add nodes to the defined Style, and update the TaskMonitor to indicate the current activity.
|
void |
handleEvent(org.cytoscape.session.events.SessionAboutToBeSavedEvent e) |
void |
handleEvent(org.cytoscape.session.events.SessionLoadedEvent e) |
void |
imageUpdated(GraphicsChangedEvent e)
Update according to the updated images provided in this event.
|
void |
removeNodes(org.cytoscape.work.TaskMonitor monitor)
Remove the IDARE Ndoes from the current Visualstyle (if they were added) and restore default values.
|
void |
setAddNodesTaskFactory(AddNodesToStyleTaskFactory factory)
set the AddNodesTaskFactory
|
void |
shutDown()
Restore the stored values to all styles.
|
boolean |
styleUsed(String StyleName)
Test whether a given Style uses IDARE Image Nodes.
|
boolean |
viewUsesStyleWithNodes(org.cytoscape.view.model.CyNetworkView view)
Test whether a given NetworkView uses a Style containing ImageNodes.
|
public StyleManager(ImageStorage imf, org.cytoscape.view.vizmap.VisualMappingManager vmmServiceRef, org.cytoscape.view.model.CyNetworkViewManager cyNetViewMgr, org.cytoscape.event.CyEventHelper eventHelper, NodeManager nm, org.cytoscape.application.CyApplicationManager cyAppMgr, ActiveNodeManager anm)
imf
- The ImageStore for the ManagervmmServiceRef
- the VisualMappingManager
to usecyNetViewMgr
- The CyNetworkViewManager
to useeventHelper
- the CyEventHelper
to usenm
- the NodeManager
to usecyAppMgr
- the CyApplicationManager
to useanm
- the ActiveNodeManager
to usepublic void setAddNodesTaskFactory(AddNodesToStyleTaskFactory factory)
factory
- The Factory to usepublic void addNodes(org.cytoscape.work.TaskMonitor monitor)
monitor
- the TaskMonitor
to usepublic void addNodesToStyleDuringLoad(org.cytoscape.work.TaskMonitor monitor, org.cytoscape.view.vizmap.VisualStyle styleToModify)
monitor
- the TaskMonitor
to usestyleToModify
- the style to add nodes topublic void removeNodes(org.cytoscape.work.TaskMonitor monitor)
monitor
- the TaskMonitor
to usepublic void shutDown()
public void handleEvent(org.cytoscape.session.events.SessionLoadedEvent e)
handleEvent
in interface org.cytoscape.session.events.SessionLoadedListener
public void handleEvent(org.cytoscape.session.events.SessionAboutToBeSavedEvent e)
handleEvent
in interface org.cytoscape.session.events.SessionAboutToBeSavedListener
public boolean styleUsed(String StyleName)
StyleName
- The Style to testpublic boolean viewUsesStyleWithNodes(org.cytoscape.view.model.CyNetworkView view)
view
- - the view to checkCyNetworkView
uses a style that contains image nodes.public void imageUpdated(GraphicsChangedEvent e)
GraphicsChangedListener
imageUpdated
in interface GraphicsChangedListener
e
- the GraphicsChangedEvent
to processCopyright © 2018. All rights reserved.