Coverage Report - org.kuali.student.common.ui.client.configurable.mvc.layouts.BasicLayoutWithContentHeader
 
Classes in this File Line Coverage Branch Coverage Complexity
BasicLayoutWithContentHeader
0%
0/16
N/A
1
 
 1  
 package org.kuali.student.common.ui.client.configurable.mvc.layouts;
 2  
 
 3  
 import org.kuali.student.common.ui.client.configurable.mvc.LayoutController;
 4  
 import org.kuali.student.common.ui.client.mvc.View;
 5  
 import org.kuali.student.common.ui.client.widgets.headers.KSDocumentHeader;
 6  
 
 7  
 import com.google.gwt.user.client.ui.FlowPanel;
 8  
 
 9  
 /**
 10  
  *  A basic implementation of a LayoutController, no navigation, all showView calls must be invoked
 11  
  * by the app.  This implementation has a header that can be manipulated.
 12  
  * 
 13  
  * @author Kuali Student Team
 14  
  *
 15  
  */
 16  
 public class BasicLayoutWithContentHeader extends LayoutController{
 17  
 
 18  0
         protected FlowPanel viewContainer = new FlowPanel();
 19  0
         protected FlowPanel layout = new FlowPanel();
 20  0
         protected KSDocumentHeader header = new KSDocumentHeader(false);
 21  
 
 22  
         public BasicLayoutWithContentHeader(String controllerId) {
 23  0
                 super();
 24  0
                 layout.add(header);
 25  0
                 layout.add(viewContainer);
 26  0
                 this.initWidget(layout);
 27  0
                 header.addStyleName("Lum-DocumentHeader-Spacing");
 28  0
         }
 29  
         
 30  
         public KSDocumentHeader getHeader(){
 31  0
                 return header;
 32  
         }
 33  
 
 34  
         @Override
 35  
         protected void hideView(View view) {
 36  0
                 viewContainer.clear();
 37  0
         }
 38  
 
 39  
         @Override
 40  
         protected void renderView(View view) {
 41  0
                 viewContainer.add(view.asWidget());
 42  0
         }
 43  
 
 44  
         /** 
 45  
          * This version of updateModel only updates from the currentView (since only one view is shown/accessed at a time).  
 46  
          * Call updateModelFromView to update from a specific view under this controller's scope.
 47  
          */
 48  
         @Override
 49  
         public void updateModel() {
 50  0
                 this.updateModelFromCurrentView();
 51  0
         }
 52  
 
 53  
 }