Coverage Report - org.kuali.student.lum.program.client.core.view.CoreLearningObjectivesViewConfiguration
 
Classes in this File Line Coverage Branch Coverage Complexity
CoreLearningObjectivesViewConfiguration
0%
0/11
0%
0/2
1.25
 
 1  
 package org.kuali.student.lum.program.client.core.view;
 2  
 
 3  
 import org.kuali.student.common.ui.client.configurable.mvc.Configurer;
 4  
 import org.kuali.student.common.ui.client.configurable.mvc.views.VerticalSectionView;
 5  
 import org.kuali.student.common.ui.client.widgets.field.layout.element.MessageKeyInfo;
 6  
 import org.kuali.student.common.ui.client.widgets.menus.KSListPanel;
 7  
 import org.kuali.student.lum.common.client.configuration.AbstractSectionConfiguration;
 8  
 import org.kuali.student.lum.common.client.lo.TreeStringBinding;
 9  
 import org.kuali.student.lum.program.client.ProgramConstants;
 10  
 import org.kuali.student.lum.program.client.ProgramMsgConstants;
 11  
 import org.kuali.student.lum.program.client.ProgramSections;
 12  
 import org.kuali.student.lum.program.client.core.CoreEditableHeader;
 13  
 
 14  
 /**
 15  
  * @author Igor
 16  
  */
 17  
 public class CoreLearningObjectivesViewConfiguration extends AbstractSectionConfiguration {
 18  
 
 19  
      public static CoreLearningObjectivesViewConfiguration create(Configurer configurer) {
 20  0
          return new CoreLearningObjectivesViewConfiguration(configurer, false);
 21  
      }
 22  
 
 23  
      public static CoreLearningObjectivesViewConfiguration createSpecial(Configurer configurer) {
 24  0
          return new CoreLearningObjectivesViewConfiguration(configurer, true);
 25  
      }
 26  
 
 27  0
      private CoreLearningObjectivesViewConfiguration(Configurer configurer, boolean isSpecial) {
 28  0
          this.setConfigurer(configurer);
 29  0
          String title = getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS_LEARNINGOBJECTIVES);
 30  0
          if (!isSpecial){
 31  0
              this.rootSection = new VerticalSectionView(ProgramSections.LEARNING_OBJECTIVES_VIEW, title,
 32  
                      ProgramConstants.PROGRAM_MODEL_ID);
 33  
          } else {
 34  0
              this.rootSection = new VerticalSectionView(ProgramSections.LEARNING_OBJECTIVES_VIEW, title, 
 35  
                      ProgramConstants.PROGRAM_MODEL_ID, new CoreEditableHeader(title, ProgramSections.LEARNING_OBJECTIVES_EDIT));
 36  
          }
 37  0
      }
 38  
      
 39  
      protected void buildLayout() {
 40  0
          configurer.addReadOnlyField(rootSection, ProgramConstants.LEARNING_OBJECTIVES, new MessageKeyInfo(""), new KSListPanel()).setWidgetBinding(new TreeStringBinding());
 41  0
      }
 42  
 }