1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package p3j.gui.panels.projections;
17
18 import java.util.List;
19
20 import javax.swing.JPanel;
21 import javax.swing.tree.TreePath;
22
23 import p3j.gui.panels.PropertiesShowPanelFactory;
24 import p3j.pppm.parameters.ParameterInstance;
25
26
27
28
29
30
31
32
33
34
35 public class GenerationNode extends ProjectionTreeNode<List<ParameterInstance>> {
36
37
38
39
40 private static final long serialVersionUID = 6051811013784521035L;
41
42
43
44
45
46
47
48 public GenerationNode(List<ParameterInstance> instances) {
49 super(instances, "Descendant Generation "
50 + (instances.get(0).getGeneration()));
51 }
52
53 @Override
54 public JPanel selected(TreePath selectionPath, final IProjectionTree projTree) {
55 PropertiesShowPanelFactory pspf = new PropertiesShowPanelFactory();
56 pspf.sep("General Information");
57 pspf.app("Descendant Generation:", getEntity().get(0).getGeneration());
58 pspf.app("Parameters:", getEntity().size());
59 pspf.app("Populations:", this.getChildCount());
60 return pspf.constructPanel();
61 }
62
63 }