Package org.cytoscape.view.model
Interface CyNetworkViewManager
public interface CyNetworkViewManager
Basic access to network views in an instance of Cytoscape.
Module: viewmodel-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>viewmodel-api</artifactId> </dependency>
Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addNetworkView
(CyNetworkView view) Registers a network view with the network view manager and sets the new view as current.void
addNetworkView
(CyNetworkView view, boolean setCurrent) Registers a network view with the network view manager.void
Destroys a network view.getNetworkViews
(CyNetwork network) Returns a collection of network views corresponding to the specified network, if found.Provides the set of network views that are currently known to the network manager.void
reset()
Releases all currently held references and resources.boolean
viewExists
(CyNetwork network) Determines whether a network view for the specified network is known to the network view manager.
-
Method Details
-
getNetworkViewSet
Set<CyNetworkView> getNetworkViewSet()Provides the set of network views that are currently known to the network manager.- Returns:
- the set of all network views maintained by the network view manager
-
getNetworkViews
Returns a collection of network views corresponding to the specified network, if found.- Parameters:
network
- The network we're requesting a view of.- Returns:
- Empty set if network view was found corresponding to "networkId", else collection of network views
-
viewExists
Determines whether a network view for the specified network is known to the network view manager.- Parameters:
network
- The network for which we want to know whether a view exists.- Returns:
- true if a view was found that corresponds to "networkId", else false
-
destroyNetworkView
Destroys a network view.- Parameters:
view
- a non-null network view
-
addNetworkView
Registers a network view with the network view manager and sets the new view as current. This has the same effect asaddNetworkView(view, true)
;- Parameters:
view
- a non-null network view
-
addNetworkView
Registers a network view with the network view manager.- Parameters:
view
- a non-null network viewsetCurrent
- if true, also sets the new view as current
-
reset
void reset()Releases all currently held references and resources. Note: make sure all references are released after this method call. Otherwise, it can be a potential memory leak problem.
Cytoscape Backwards Compatibility (DO NOT USE): This method may change or be removed in future minor version upgrades of Cytoscape. It is not safe for Apps to call or override this method.
Apps should not call this method. Resetting the CyNetworkViewManager at the wrong time will put Cytoscape into an inconsistent internal state.
-