public class NetworkViewSwitcher
extends org.cytoscape.task.AbstractNodeViewTaskFactory
implements org.cytoscape.model.events.NetworkAboutToBeDestroyedListener, org.cytoscape.model.events.RowsSetListener, org.cytoscape.session.events.SessionAboutToBeSavedListener
Modifier and Type | Field and Description |
---|---|
static String |
PREFERRED_OPTION |
static String |
Title |
Constructor and Description |
---|
NetworkViewSwitcher(org.cytoscape.service.util.CyServiceRegistrar reg,
IDARESettingsManager ism)
Constructs a NetworkView Switcher for the current application.
|
Modifier and Type | Method and Description |
---|---|
void |
addNetworkToTree(org.cytoscape.model.CyNetwork parent,
org.cytoscape.model.CyNetwork child,
String ColumnID,
String NetworkID)
Add a subnetwork to the subnetwork hierarchy.
|
void |
addSubNetworkView(org.cytoscape.model.CyNetwork network,
org.cytoscape.view.model.CyNetworkView view)
Add a new Network to the list of existing networks and also add its view.
|
org.cytoscape.work.TaskIterator |
createTaskIterator(org.cytoscape.view.model.View<org.cytoscape.model.CyNode> arg0,
org.cytoscape.view.model.CyNetworkView arg1) |
HashMap<org.cytoscape.model.CyNetwork,org.cytoscape.view.model.CyNetworkView> |
getExistingNetworks() |
HashMap<org.cytoscape.model.CyNetwork,org.cytoscape.view.model.CyNetworkView> |
getExistingNetworksForColumn(String selectedColumn)
Get the subnetworks that currently exist for the provided column present in any parent network
|
String |
getSubNetworkName(org.cytoscape.model.CyNetwork network)
Get the internal name of the network (i.e.
|
Set<String> |
getSubNetworkWorksForNetwork(org.cytoscape.model.CyNetwork parentnetwork,
String ColName)
Get the Names of all subnetworks for a specific parent network and a specific column.
|
void |
handleEvent(org.cytoscape.model.events.NetworkAboutToBeDestroyedEvent e) |
void |
handleEvent(org.cytoscape.model.events.RowsSetEvent e)
Check whether the set row is a network row and if, check whether it refers to a network,
we are listening to and update all links accordingly
|
void |
handleEvent(org.cytoscape.session.events.SessionAboutToBeSavedEvent arg0) |
void |
reset()
Reset the Switcher (e.g.
|
public static String PREFERRED_OPTION
public static String Title
public NetworkViewSwitcher(org.cytoscape.service.util.CyServiceRegistrar reg, IDARESettingsManager ism)
reg
- - A CyServiceRegistrar to obtain relevant servicesism
- The IDARESettingsManager
to usepublic org.cytoscape.work.TaskIterator createTaskIterator(org.cytoscape.view.model.View<org.cytoscape.model.CyNode> arg0, org.cytoscape.view.model.CyNetworkView arg1)
createTaskIterator
in interface org.cytoscape.task.NodeViewTaskFactory
public void reset()
public void addSubNetworkView(org.cytoscape.model.CyNetwork network, org.cytoscape.view.model.CyNetworkView view)
network
- - The new CyNetwork
view
- - A CyNetworkView
for the provided CyNetwork
public void addNetworkToTree(org.cytoscape.model.CyNetwork parent, org.cytoscape.model.CyNetwork child, String ColumnID, String NetworkID)
parent
- The parent network (to retrieve the parent node, or create it if parent non nullchild
- The child node (i.e. the node to add to the hierarchyColumnID
- The Column the subnetwork is generated from.NetworkID
- The ID of the network (should be an entry of the column indicated).public String getSubNetworkName(org.cytoscape.model.CyNetwork network)
network
- The network to retrieve a name forpublic HashMap<org.cytoscape.model.CyNetwork,org.cytoscape.view.model.CyNetworkView> getExistingNetworks()
public HashMap<org.cytoscape.model.CyNetwork,org.cytoscape.view.model.CyNetworkView> getExistingNetworksForColumn(String selectedColumn)
selectedColumn
- The Column to obtain the Network to View pairs forMap
of CyNetwork
to CyNetworkView
pairs. The Views can be null, if there is no existing view for the given network.public Set<String> getSubNetworkWorksForNetwork(org.cytoscape.model.CyNetwork parentnetwork, String ColName)
parentnetwork
- the parent network to retrieve subnetwork names forColName
- the currently selected Column (to only return names specific for this network)Set
of String with al the subnetwork Names for the provided parent network created using the specified column.public void handleEvent(org.cytoscape.model.events.NetworkAboutToBeDestroyedEvent e)
handleEvent
in interface org.cytoscape.model.events.NetworkAboutToBeDestroyedListener
public void handleEvent(org.cytoscape.model.events.RowsSetEvent e)
handleEvent
in interface org.cytoscape.model.events.RowsSetListener
public void handleEvent(org.cytoscape.session.events.SessionAboutToBeSavedEvent arg0)
handleEvent
in interface org.cytoscape.session.events.SessionAboutToBeSavedListener
Copyright © 2018. All rights reserved.