コード例 #1
0
  @Override
  public void run(final TaskMonitor taskMonitor) {
    if (network == null) network = appMgr.getCurrentNetwork();
    Collection<CyNetworkView> views = viewMgr.getNetworkViews(network);

    nodes = nodeList.getValue();

    for (CyNetworkView view : views) {
      Set<View<CyNode>> nodeViews = new HashSet<View<CyNode>>();
      if (nodes == null || nodes.size() == 0) {
        nodeViews = CyLayoutAlgorithm.ALL_NODE_VIEWS;
      } else {
        for (CyNode node : nodes) nodeViews.add(view.getNodeView(node));
      }

      insertTasksAfterCurrentTask(
          algorithm.createTaskIterator(view, layoutContext, nodeViews, getLayoutAttribute()));
    }
  }
コード例 #2
0
 @Tunable(description = "Nodes to layout", context = "nogui")
 public NodeList getnodeList() {
   if (network == null) network = appMgr.getCurrentNetwork();
   nodeList.setNetwork(network);
   return nodeList;
 }