Clover Coverage Report - Kuali Student 1.3.0-SNAPSHOT (Aggregated)
Coverage timestamp: Thu Apr 28 2011 05:03:32 EDT
../../../../../../../../../img/srcFileCovDistChart0.png 2% of files have more coverage
12   87   8   2
4   38   0.67   6
6     1.33  
1    
 
  DisplayItem       Line # 35 12 0% 8 22 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.multiplicity;
17   
18   
19    import org.kuali.student.common.ui.client.configurable.mvc.multiplicity.MultiplicityComposite.StyleType;
20    import org.kuali.student.common.ui.client.widgets.KSLabel;
21   
22    import com.google.gwt.user.client.ui.FlowPanel;
23    import com.google.gwt.user.client.ui.Widget;
24   
25    /**
26    * This is a read only version of MultiplicityItem for use in read only multiplicity composites.
27    *
28    *
29    * @author Kuali Student Team
30    */
31   
32    /**
33    * @deprecated
34    */
 
35    public class DisplayItem extends MultiplicityItem {
36    private boolean loaded = false;
37    private KSLabel itemLabel;
38   
39    protected FlowPanel itemPanel = new FlowPanel();
40   
 
41  0 toggle public DisplayItem(){
42  0 initWidget(itemPanel);
43    }
44   
 
45  0 toggle public DisplayItem(StyleType style){
46  0 this.initWidget(itemPanel);
47   
48    }
 
49  0 toggle public void onLoad(){
50    }
51   
52    /**
53    * @see org.kuali.student.common.ui.client.configurable.mvc.multiplicity.MultiplicityItem#clear()
54    */
 
55  0 toggle @Override
56    public void clear() {
57  0 loaded = false;
58    }
59   
60    /**
61    * @see org.kuali.student.common.ui.client.configurable.mvc.multiplicity.MultiplicityItem#redraw()
62    */
 
63  0 toggle @Override
64    public void redraw() {
65  0 Widget item = getItemWidget();
66  0 if (!loaded){
67   
68  0 if (itemLabel != null) {
69  0 itemPanel.add(itemLabel);
70  0 itemLabel.addStyleName("KS-Multiplicity-Item-Header");
71    }
72  0 itemPanel.add(item);
73  0 itemPanel.addStyleName("KS-Multiplicity-Display-Item");
74  0 loaded = true;
75    }
76    //redraw() removed, probably not needed here
77    /* if (item instanceof Section){
78    ((Section)item).redraw();
79    }*/
80    }
81   
82   
 
83  0 toggle public void setItemLabel(String itemLabel) {
84  0 this.itemLabel = new KSLabel(itemLabel);
85    }
86   
87    }