private Map data = null;
public Object getData() {
if (data == null) {
data = new LinkedHashMap();
Project projectA = new Project("projectA", 10);
Directory adir1 = new Directory("ADir1", 50);
adir1.addFile(new File("AFile1", 60));
adir1.addFile(new File("AFile2", 61));
Directory adir2 = new Directory("ADir2", 101);
projectA.addDirectory(adir1);
projectA.addDirectory(adir2);
data.put(projectA.getName(), projectA);
Project projectB = new Project("projectB", 501);
Directory bdir1 = new Directory("BDir1", 600);
Directory bdir2 = new Directory("BDir2", 700);
Directory bdir3 = new Directory("BDir3", 801);
projectB.addDirectory(bdir1);
projectB.addDirectory(bdir2);
projectB.addDirectory(bdir3);
data.put(projectB.getName(), projectB);
}
return data;
}
});
final ValueBinding dirVB = application.createValueBinding("#{project.directories}");