Clover Coverage Report - KS Common 1.2-M4-SNAPSHOT (Aggregated)
Coverage timestamp: Wed Jul 20 2011 12:23:34 EDT
../../../../../../../img/srcFileCovDistChart0.png 30% of files have more coverage
12   61   7   2
2   36   0.58   6
6     1.17  
1    
 
  ULPanel       Line # 18 12 0% 7 20 0% 0.0
 
No Tests
 
1    package org.kuali.student.common.ui.client.widgets;
2   
3    import java.util.List;
4   
5    import com.google.gwt.dom.client.Document;
6    import com.google.gwt.dom.client.UListElement;
7    import com.google.gwt.user.client.Element;
8    import com.google.gwt.user.client.ui.ComplexPanel;
9    import com.google.gwt.user.client.ui.Widget;
10   
11    /**
12    *
13    * A simple list panel that uses the UL/LI tag HTML structure
14    *
15    * @author alubbers
16    *
17    */
 
18    public class ULPanel extends ComplexPanel {
19   
20    private UListElement list;
21   
 
22  0 toggle public ULPanel() {
23  0 list = Document.get().createULElement();
24  0 setElement(list);
25    }
26   
 
27  0 toggle @Override
28    public void add(Widget child) {
29  0 addChildElement(child, null);
30    }
31   
 
32  0 toggle public void add(Widget child, String liClassName) {
33  0 addChildElement(child, liClassName);
34    }
35   
 
36  0 toggle private void addChildElement(Widget child, String className) {
37  0 Element li = Document.get().createLIElement().cast();
38  0 if(className != null) {
39  0 li.setClassName(className);
40    }
41  0 list.appendChild(li);
42  0 super.add(child, li);
43    }
44   
 
45  0 toggle public void setULClassName(String className) {
46  0 list.setClassName(className);
47    }
48   
49    /**
50    *
51    * This method adds a collection of widgets as LI entries under this UL
52    *
53    * @param reqCompWidgets
54    * @param className CSS class name for each LI
55    */
 
56  0 toggle public void addAll(List<Widget> widgets, String className) {
57  0 for(Widget w : widgets) {
58  0 add(w, className);
59    }
60    }
61    }