View Javadoc

1   package org.kuali.student.lum.program.client.credential.edit;
2   
3   import org.kuali.student.common.ui.client.configurable.mvc.Configurer;
4   import org.kuali.student.common.ui.client.mvc.Controller;
5   import org.kuali.student.common.ui.client.mvc.View;
6   import org.kuali.student.lum.common.client.configuration.AbstractControllerConfiguration;
7   import org.kuali.student.lum.program.client.ProgramMsgConstants;
8   import org.kuali.student.lum.program.client.ProgramSections;
9   import org.kuali.student.lum.program.client.credential.CredentialManager;
10  import org.kuali.student.lum.program.client.requirements.ProgramRequirementsViewController;
11  
12  import com.google.gwt.user.client.ui.Widget;
13  
14  public class CredentialRequirementsEditConfiguration extends AbstractControllerConfiguration {
15  
16      private ProgramRequirementsViewController progReqcontroller;
17      
18      public CredentialRequirementsEditConfiguration(Configurer configurer) {
19          this.setConfigurer(configurer);
20      }
21  
22      @Override
23      public View getView() {
24          progReqcontroller = new ProgramRequirementsViewController(controller, CredentialManager.getEventBus(), 
25                                      getLabel(ProgramMsgConstants.PROGRAM_MENU_SECTIONS_REQUIREMENTS), ProgramSections.PROGRAM_REQUIREMENTS_EDIT, false, null);
26          return progReqcontroller;
27      }
28  
29      @Override
30      protected void buildLayout() {
31      }
32  
33      @Override
34      public void setController(Controller controller) {
35          this.controller = controller;
36          if (progReqcontroller != null) {
37              progReqcontroller.setParentController(controller);
38          }
39      }
40  
41      @Override
42      public Widget asWidget() {
43          return controller;
44      }
45  
46      @Override
47      public Enum<?> getName() {
48          return ProgramSections.PROGRAM_REQUIREMENTS_EDIT;
49      }
50  }