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 |
|
|
14 |
|
|
15 |
|
@author |
16 |
|
|
17 |
|
|
|
|
| 0% |
Uncovered Elements: 20 (20) |
Complexity: 7 |
Complexity Density: 0.58 |
|
18 |
|
public class ULPanel extends ComplexPanel { |
19 |
|
|
20 |
|
private UListElement list; |
21 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
22 |
0
|
public ULPanel() {... |
23 |
0
|
list = Document.get().createULElement(); |
24 |
0
|
setElement(list); |
25 |
|
} |
26 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
27 |
0
|
@Override... |
28 |
|
public void add(Widget child) { |
29 |
0
|
addChildElement(child, null); |
30 |
|
} |
31 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
32 |
0
|
public void add(Widget child, String liClassName) {... |
33 |
0
|
addChildElement(child, liClassName); |
34 |
|
} |
35 |
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 2 |
Complexity Density: 0.4 |
|
36 |
0
|
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 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
45 |
0
|
public void setULClassName(String className) {... |
46 |
0
|
list.setClassName(className); |
47 |
|
} |
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
@param |
54 |
|
@param |
55 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
56 |
0
|
public void addAll(List<Widget> widgets, String className) {... |
57 |
0
|
for(Widget w : widgets) { |
58 |
0
|
add(w, className); |
59 |
|
} |
60 |
|
} |
61 |
|
} |