1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.kuali.student.common.ui.client.configurable.mvc.views; |
17 |
|
|
18 |
|
import org.kuali.student.common.ui.client.configurable.mvc.SectionTitle; |
19 |
|
import org.kuali.student.common.ui.client.widgets.field.layout.layouts.VerticalFieldLayout; |
20 |
|
|
21 |
|
import com.google.gwt.user.client.ui.Widget; |
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
@author |
30 |
|
|
31 |
|
|
|
|
| 0% |
Uncovered Elements: 29 (29) |
Complexity: 11 |
Complexity Density: 0.65 |
|
32 |
|
public class VerticalSectionView extends SectionView { |
33 |
|
|
34 |
|
public VerticalSectionView() { |
35 |
|
super(); |
36 |
|
} |
37 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
38 |
0
|
... |
39 |
0
|
|
40 |
|
|
41 |
|
public VerticalSectionView(Enum<?> viewEnum, String name, String modelId) { |
42 |
|
init(viewEnum, name, modelId, true); |
43 |
|
} |
44 |
|
|
45 |
|
|
46 |
|
@param |
47 |
|
@param |
|
|
| 0% |
Uncovered Elements: 13 (13) |
Complexity: 4 |
Complexity Density: 0.44 |
|
48 |
0
|
@param... |
49 |
0
|
@param |
50 |
0
|
|
51 |
0
|
public VerticalSectionView(Enum<?> viewEnum, String name, String modelId, boolean showTitle) { |
52 |
0
|
super(viewEnum, name); |
53 |
0
|
this.modelId = modelId; |
54 |
0
|
if (name != null && !name.isEmpty()) { |
55 |
|
SectionTitle sectionTitle = SectionTitle.generateH2Title(getName()); |
56 |
0
|
if (showTitle) { |
57 |
|
layout = new VerticalFieldLayout(sectionTitle); |
58 |
|
} else { |
59 |
0
|
layout = new VerticalFieldLayout(); |
60 |
|
} |
61 |
0
|
} else { |
62 |
|
layout = new VerticalFieldLayout(); |
63 |
|
} |
64 |
|
this.add(layout); |
65 |
|
} |
66 |
|
|
67 |
|
|
68 |
|
|
69 |
|
@param |
70 |
|
@param |
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
71 |
0
|
@param... |
72 |
0
|
@param |
73 |
0
|
|
74 |
0
|
public VerticalSectionView(Enum<?> viewEnum, String name, String modelId, Widget titleWidget) { |
75 |
0
|
super(viewEnum, name); |
76 |
|
this.modelId = modelId; |
77 |
|
layout = new VerticalFieldLayout(titleWidget); |
78 |
|
this.add(layout); |
79 |
|
} |
80 |
|
|
81 |
|
public void init(Enum<?> viewEnum, String name, String modelId, boolean showTitle) { |
82 |
|
super.init(viewEnum, name); |
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 3 |
Complexity Density: 1.5 |
|
83 |
0
|
this.modelId = modelId;... |
84 |
|
if (name != null && !name.isEmpty()) { |
85 |
|
SectionTitle sectionTitle = SectionTitle.generateH2Title(getName()); |
86 |
0
|
if (showTitle) { |
87 |
0
|
layout = new VerticalFieldLayout(sectionTitle); |
88 |
|
} else { |
89 |
|
layout = new VerticalFieldLayout(); |
90 |
|
} |
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
91 |
0
|
} else {... |
92 |
|
layout = new VerticalFieldLayout(); |
93 |
|
} |
94 |
|
this.add(layout); |
95 |
|
} |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
96 |
0
|
... |
97 |
0
|
|
98 |
|
|
99 |
|
|
100 |
|
@see |
101 |
|
|
102 |
|
@Override |
103 |
|
@SuppressWarnings("unchecked") |
104 |
|
public void updateModel() { |
105 |
|
if (model != null && isValidationEnabled()) { |
106 |
|
super.updateModel(model); |
107 |
|
} |
108 |
|
} |
109 |
|
|
110 |
|
@Override |
111 |
|
public void clear() { |
112 |
|
|
113 |
|
} |
114 |
|
|
115 |
|
public void setSectionTitle(String title) { |
116 |
|
layout.setLayoutTitle(SectionTitle.generateH2Title(title)); |
117 |
|
} |
118 |
|
} |