コード例 #1
0
    @Override
    protected Node[] createNodes(Object arg0) {

      for (Group g : registeredGroups) {
        g.getChangedEvent().removeListener(this);
      }
      registeredGroups.clear();

      Pair<String, List<Group>> p = (Pair<String, List<Group>>) arg0;
      if (p.getLeft().length() == 0) {

        List<Node> curNodes = new ArrayList<Node>();
        for (Group g : p.getRight()) {
          for (InputGraph graph : g.getGraphs()) {
            curNodes.add(new GraphNode(graph));
          }
          g.getChangedEvent().addListener(this);
          registeredGroups.add(g);
        }

        Node[] result = new Node[curNodes.size()];
        for (int i = 0; i < curNodes.size(); i++) {
          result[i] = curNodes.get(i);
        }
        return result;

      } else {
        return new Node[] {
          new FolderNode(p.getLeft(), parent.organizer, parent.subFolders, p.getRight())
        };
      }
    }
コード例 #2
0
 public InputGraph getSecondSnapshot() {
   return group.getGraphs().get(model.getSecondPosition());
 }
コード例 #3
0
 public InputGraph getFirstSnapshot() {
   return group.getGraphs().get(model.getFirstPosition());
 }