Class NodeList


  • public class NodeList
    extends Object
    This class implements a wrapper for a List of CyNodes that can be used by the Tunables mechanism. Currently, it is only implemented by command tunables so it will be ignored in GUI (Swing) contexts. A typical use might look like:
     @Tunable(description="Network", context="nogui", gravity=1.0)
     CyNetwork network;
    
     public NodeList nodeList = new NodeList(null);
     
     @Tunable(description="Nodes to select", context="nogui", gravity=2.0)
     public NodeList getnodeList() {
            nodeList.setNetwork(network); // Should check for null
            return nodeList;
     }
     
     public void setnodeList(NodeList setValue) {}
     

    Module: command-executor-api

    To use this in your app, include the following dependency in your POM:

    <dependency>
        <groupId>org.cytoscape</groupId>
        <artifactId>command-executor-api</artifactId>
    </dependency>

    Cytoscape Backwards Compatibility (Final Class): This class is final and therefore can't be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.
    • Constructor Detail

      • NodeList

        public NodeList()
        Create a new NodeList object with no initial network
      • NodeList

        public NodeList​(CyNetwork targetNetwork)
        Create a new NodeList object with an initial network
        Parameters:
        targetNetwork - the network this nodelist will be in
    • Method Detail

      • setNetwork

        public void setNetwork​(CyNetwork network)
        Set the network for this nodelist
        Parameters:
        network - the network for this nodelist
      • getNetwork

        public CyNetwork getNetwork()
        Get the network for this nodelist
        Returns:
        the network we're looking through
      • setValue

        public void setValue​(List<CyNode> nodeList)
        Set the list of nodes
        Parameters:
        nodeList - the list of nodes
      • getValue

        public List<CyNode> getValue()
        Get the list of nodes
        Returns:
        the list of nodes