Coverage Report - org.kuali.student.lum.program.client.major.view.SpecializationsViewConfiguration
 
Classes in this File Line Coverage Branch Coverage Complexity
SpecializationsViewConfiguration
0%
0/13
N/A
1
 
 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  
     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  
     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
     private SpecializationsViewConfiguration(SectionView sectionView) {
 33  0
         rootSection = sectionView;
 34  0
     }
 35  
 
 36  
     @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  0
     }
 45  
 }