示例#1
0
 private static Children createFolderChildren(Folder folder) {
   for (FolderElement elem : folder.getElements()) {
     if (elem instanceof Folder) {
       return new FolderChildren(folder);
     }
   }
   return Children.LEAF;
 }
示例#2
0
 @Override
 public void addNotify() {
   List<Folder> result = new ArrayList<>();
   for (FolderElement o : folder.getElements()) {
     if (o instanceof Folder) {
       result.add((Folder) o);
     }
   }
   this.setKeys(result);
 }
示例#3
0
  private CompilationNode(final Folder folder, Children children, InstanceContent content) {
    super(children, new AbstractLookup(content));
    this.setDisplayName(folder.getName());

    if (folder instanceof Group) {
      content.add(
          new OpenCookie() {

            @Override
            public void open() {
              final List<InputGraph> graphs = ((Group) folder).getGraphs();
              if (graphs.isEmpty()) {
                JOptionPane.showMessageDialog(
                    null, "Cannot open compilation, because there was no snapshots recorded!");
              } else {
                Lookup.getDefault().lookup(GraphViewer.class).view(graphs.get(0));
              }
            }
          });
    }
    content.add(folder);
    folder.getChangedEvent().addListener(this);
  }
示例#4
0
 public FolderChildren(Folder folder) {
   this.folder = folder;
   folder.getChangedEvent().addListener(changedListener);
 }