Clover Coverage Report - Kuali Student 1.2.1-SNAPSHOT (Aggregated)
Coverage timestamp: Wed Nov 2 2011 04:03:58 EST
../../../../../../../../../img/srcFileCovDistChart0.png 42% of files have more coverage
17   99   11   2.83
6   43   0.65   6
6     1.83  
1    
Warning
  • The source file used to generate this report was changed after Clover generated coverage information. The coverage reported may not match the source lines. You should regenerate the coverage information and the report to ensure the files are in sync.
 
  VerticalSectionView       Line # 32 17 0% 11 29 0% 0.0
 
No Tests
 
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    */
15   
16    package org.kuali.student.common.ui.client.configurable.mvc.views;
17   
18    import org.kuali.student.common.ui.client.configurable.mvc.SectionTitle;
19    import org.kuali.student.common.ui.client.widgets.field.layout.layouts.VerticalFieldLayout;
20   
21    import com.google.gwt.user.client.ui.Widget;
22   
23    /**
24    * The vertical layout implementation of SectionView. The ui layout behaves exactly the same as
25    * VerticalSection.
26    *
27    * A model id can be passed in to specify a model this particular view uses.
28    *
29    * @author Brian Smith
30    *
31    */
 
32    public class VerticalSectionView extends SectionView {
33   
34    public VerticalSectionView() {
35    super();
36    }
37   
 
38  0 toggle /**
39  0 * Same as VerticalSectionView(Enum<?> viewEnum, String name, String modelId, true)
40    */
41    public VerticalSectionView(Enum<?> viewEnum, String name, String modelId) {
42    init(viewEnum, name, modelId, true);
43    }
44   
45    /**
46    * @param viewEnum Enumeration of this view - id used for navigation, history, and showing a view
47    * @param name Name of this view - what this view is called in the breadcrumb
 
48  0 toggle * @param modelId id of the model to be used for this view when a requestModel call is made on its parent controller
49  0 * @param showTitle if true, show the view's name as an H2 header
50  0 */
51  0 public VerticalSectionView(Enum<?> viewEnum, String name, String modelId, boolean showTitle) {
52  0 super(viewEnum, name);
53  0 this.modelId = modelId;
54  0 if (name != null && !name.isEmpty()) {
55    SectionTitle sectionTitle = SectionTitle.generateH2Title(getName());
56  0 if (showTitle) {
57    layout = new VerticalFieldLayout(sectionTitle);
58    } else {
59  0 layout = new VerticalFieldLayout();
60    }
61  0 } else {
62    layout = new VerticalFieldLayout();
63    }
64    this.add(layout);
65    }
66   
67    /**
68    * VerticalSectionView with a custom titleWidget defined
69    * @param viewEnum
70    * @param name
 
71  0 toggle * @param modelId
72  0 * @param titleWidget
73  0 */
74  0 public VerticalSectionView(Enum<?> viewEnum, String name, String modelId, Widget titleWidget) {
75  0 super(viewEnum, name);
76    this.modelId = modelId;
77    layout = new VerticalFieldLayout(titleWidget);
78    this.add(layout);
79    }
80   
81    public void init(Enum<?> viewEnum, String name, String modelId, boolean showTitle) {
82    super.init(viewEnum, name);
 
83  0 toggle this.modelId = modelId;
84    if (name != null && !name.isEmpty()) {
85    SectionTitle sectionTitle = SectionTitle.generateH2Title(getName());
86  0 if (showTitle) {
87  0 layout = new VerticalFieldLayout(sectionTitle);
88    } else {
89    layout = new VerticalFieldLayout();
90    }
 
91  0 toggle } else {
92    layout = new VerticalFieldLayout();
93    }
94    this.add(layout);
95    }
 
96  0 toggle
97  0 /**
98    * This updates the model
99    *
100    * @see org.kuali.student.common.ui.client.mvc.View#updateModel()
101    */
102    @Override
103    @SuppressWarnings("unchecked")
104    public void updateModel() {
105    if (model != null && isValidationEnabled()) {
106    super.updateModel(model);
107    }
108    }
109   
110    @Override
111    public void clear() {
112    // TODO Auto-generated method stub
113    }
114   
115    public void setSectionTitle(String title) {
116    layout.setLayoutTitle(SectionTitle.generateH2Title(title));
117    }
118    }