1 |
|
package org.kuali.student.lum.program.client.major.view; |
2 |
|
|
3 |
|
import com.google.gwt.user.client.ui.FlexTable; |
4 |
|
import org.kuali.student.common.ui.client.configurable.mvc.sections.VerticalSection; |
5 |
|
import org.kuali.student.common.ui.client.configurable.mvc.views.SectionView; |
6 |
|
import org.kuali.student.common.ui.client.configurable.mvc.views.VerticalSectionView; |
7 |
|
import org.kuali.student.common.ui.client.widgets.KSCheckBox; |
8 |
|
import org.kuali.student.common.ui.client.widgets.field.layout.element.MessageKeyInfo; |
9 |
|
import org.kuali.student.lum.common.client.configuration.AbstractSectionConfiguration; |
10 |
|
import org.kuali.student.lum.common.client.widgets.AppLocations; |
11 |
|
import org.kuali.student.lum.program.client.ProgramConstants; |
12 |
|
import org.kuali.student.lum.program.client.ProgramSections; |
13 |
|
import org.kuali.student.lum.program.client.major.MajorEditableHeader; |
14 |
|
import org.kuali.student.lum.program.client.properties.ProgramProperties; |
15 |
|
import org.kuali.student.lum.program.client.variation.VariationsBinding; |
16 |
|
|
17 |
|
|
18 |
|
@author |
19 |
|
|
|
|
| 0% |
Uncovered Elements: 14 (14) |
Complexity: 4 |
Complexity Density: 0.4 |
|
20 |
|
public class SpecializationsViewConfiguration extends AbstractSectionConfiguration { |
21 |
|
|
22 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
23 |
0
|
public static SpecializationsViewConfiguration create() {... |
24 |
0
|
return new SpecializationsViewConfiguration(new VerticalSectionView(ProgramSections.SPECIALIZATIONS_VIEW, ProgramProperties.get().program_menu_sections_specializations(), ProgramConstants.PROGRAM_MODEL_ID)); |
25 |
|
} |
26 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
27 |
0
|
public static SpecializationsViewConfiguration createSpecial() {... |
28 |
0
|
String title = ProgramProperties.get().program_menu_sections_specializations(); |
29 |
0
|
return new SpecializationsViewConfiguration(new VerticalSectionView(ProgramSections.SPECIALIZATIONS_VIEW, title, ProgramConstants.PROGRAM_MODEL_ID, new MajorEditableHeader(title, ProgramSections.SPECIALIZATIONS_EDIT))); |
30 |
|
} |
31 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
32 |
0
|
private SpecializationsViewConfiguration(SectionView sectionView) {... |
33 |
0
|
rootSection = sectionView; |
34 |
|
} |
35 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
|
36 |
0
|
@Override... |
37 |
|
protected void buildLayout() { |
38 |
0
|
VerticalSection section = new VerticalSection(); |
39 |
0
|
KSCheckBox isVariationRequiredCheckBox = new KSCheckBox(ProgramProperties.get().programSpecialization_instructions()); |
40 |
0
|
isVariationRequiredCheckBox.setEnabled(false); |
41 |
0
|
configurer.addReadOnlyField(section, ProgramConstants.IS_VARIATION_REQUIRED, null, isVariationRequiredCheckBox); |
42 |
0
|
configurer.addReadOnlyField(section, ProgramConstants.VARIATIONS, new MessageKeyInfo(""), new FlexTable()).setWidgetBinding(new VariationsBinding(AppLocations.Locations.VIEW_VARIATION.getLocation(), false)); |
43 |
0
|
rootSection.addSection(section); |
44 |
|
} |
45 |
|
} |