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