Coverage Report - org.kuali.student.common.ui.client.widgets.field.layout.layouts.BorderedHeadedLayout
 
Classes in this File Line Coverage Branch Coverage Complexity
BorderedHeadedLayout
0%
0/21
N/A
1
 
 1  
 /**
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  * Date: 14-Jul-2010
 15  
  * Time: 10:52:16 AM
 16  
  */
 17  
 
 18  
 package org.kuali.student.common.ui.client.widgets.field.layout.layouts;
 19  
 
 20  
 import org.kuali.student.common.ui.client.configurable.mvc.SectionTitle;
 21  
 
 22  
 /**
 23  
  * This class will add a single border to the layout and a background colour to the header
 24  
  * Title text is .H4 heading
 25  
  *
 26  
  */
 27  
 public class BorderedHeadedLayout extends HeadedLayout{
 28  
 
 29  
         
 30  
         public BorderedHeadedLayout(){
 31  0
                 super();
 32  0
                 verticalLayout.addStyleName("ks-form-bordered-body");
 33  0
                 body.setStyleName("ks-form-bordered");
 34  0
                 body.add(verticalLayout);
 35  
 
 36  0
         }
 37  
         
 38  
         public BorderedHeadedLayout(String titleText, boolean updateable){
 39  0
                 super();
 40  0
                 this.updateable = updateable;
 41  
                 
 42  0
                 buildHeader(titleText, updateable);
 43  
 
 44  0
                 body.add(header);
 45  0
                 body.add(verticalLayout);
 46  
 
 47  0
                 body.setStyleName("ks-form-bordered");
 48  0
                 verticalLayout.addStyleName("ks-form-bordered-body");
 49  0
         }
 50  
 
 51  
         @Override
 52  
         public void setLayoutTitle(SectionTitle layoutTitle) {
 53  0
                 layoutTitle.addStyleName("ks-form-bordered-header-title");
 54  0
                 header.setHeaderTitle(layoutTitle);
 55  
                 
 56  0
         }
 57  
 
 58  
         @Override
 59  
         protected void buildHeader(String titleText, boolean updateable) {
 60  0
                 SectionTitle title = SectionTitle.generateH4Title(titleText);
 61  0
                 header = new Header(title, updateable);
 62  0
                 header.setStyleName("ks-form-bordered-header");
 63  0
                 title.addStyleName("ks-form-bordered-header-title");
 64  
                 
 65  0
         }
 66  
         
 67  
 }