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 Detail

      • 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

        Collection<CyNetworkView> getNetworkViews​(CyNetwork network)
        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

        boolean viewExists​(CyNetwork network)
        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

        void destroyNetworkView​(CyNetworkView view)
        Destroys a network view.
        Parameters:
        view - a non-null network view
      • addNetworkView

        void addNetworkView​(CyNetworkView view)
        Registers a network view with the network view manager and sets the new view as current. This has the same effect as addNetworkView(view, true);
        Parameters:
        view - a non-null network view
      • addNetworkView

        void addNetworkView​(CyNetworkView view,
                            boolean setCurrent)
        Registers a network view with the network view manager.
        Parameters:
        view - a non-null network view
        setCurrent - 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.