Clover Coverage Report - Kuali Student 1.3.0-SNAPSHOT (Aggregated)
Coverage timestamp: Thu Apr 28 2011 05:03:32 EDT
../../../../../../../../img/srcFileCovDistChart0.png 2% of files have more coverage
10   45   4   2.5
0   35   0.4   4
4     1  
1    
 
  SpecializationsViewConfiguration       Line # 20 10 0% 4 14 0% 0.0
 
No Tests
 
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 Igor
19    */
 
20    public class SpecializationsViewConfiguration extends AbstractSectionConfiguration {
21   
22   
 
23  0 toggle 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   
 
27  0 toggle 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   
 
32  0 toggle private SpecializationsViewConfiguration(SectionView sectionView) {
33  0 rootSection = sectionView;
34    }
35   
 
36  0 toggle @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    }