1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.kuali.student.common.ui.client.configurable.mvc.sections; |
17 |
|
|
18 |
|
import org.kuali.student.common.ui.client.theme.Theme; |
19 |
|
import org.kuali.student.common.ui.client.widgets.layout.HorizontalBlockFlowPanel; |
20 |
|
|
21 |
|
import com.google.gwt.user.client.ui.Composite; |
22 |
|
import com.google.gwt.user.client.ui.HTMLPanel; |
23 |
|
import com.google.gwt.user.client.ui.Image; |
24 |
|
import com.google.gwt.user.client.ui.Widget; |
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
@author |
30 |
|
|
31 |
|
|
|
|
| 0% |
Uncovered Elements: 35 (35) |
Complexity: 8 |
Complexity Density: 0.31 |
|
32 |
|
public class InfoMessage extends Composite{ |
33 |
|
private HorizontalBlockFlowPanel layout = new HorizontalBlockFlowPanel(); |
34 |
|
private Image icon = Theme.INSTANCE.getCommonImages().getWarningDiamondIcon(); |
35 |
|
private HTMLPanel message = new HTMLPanel(""); |
36 |
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
|
37 |
0
|
public InfoMessage(String text, boolean visible){... |
38 |
0
|
layout.add(icon); |
39 |
0
|
message.getElement().setInnerHTML(text); |
40 |
0
|
layout.add(message); |
41 |
0
|
icon.addStyleName("ks-message-static-image"); |
42 |
0
|
layout.addStyleName("ks-message-static"); |
43 |
0
|
this.initWidget(layout); |
44 |
0
|
this.setVisible(visible); |
45 |
|
} |
46 |
|
|
47 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
48 |
0
|
public InfoMessage(){... |
49 |
0
|
icon.addStyleName("ks-message-static-image"); |
50 |
0
|
layout.add(icon); |
51 |
0
|
layout.add(message); |
52 |
0
|
this.initWidget(layout); |
53 |
0
|
this.setVisible(false); |
54 |
|
} |
55 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
|
56 |
0
|
public InfoMessage(boolean visible, boolean showStyling){... |
57 |
0
|
icon.addStyleName("ks-message-static-image"); |
58 |
0
|
layout.add(icon); |
59 |
0
|
layout.add(message); |
60 |
0
|
this.initWidget(layout); |
61 |
0
|
this.showWarnStyling(showStyling); |
62 |
0
|
this.setVisible(visible); |
63 |
|
} |
64 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
65 |
0
|
public void setMessage(String text, boolean messageVisible){... |
66 |
0
|
message.getElement().setInnerHTML(text); |
67 |
0
|
this.setVisible(messageVisible); |
68 |
|
} |
69 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
70 |
0
|
public void insert(Widget w, int beforeIndex){... |
71 |
0
|
layout.insert(w, beforeIndex); |
72 |
|
} |
73 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
74 |
0
|
public void add(Widget w){... |
75 |
0
|
layout.add(w); |
76 |
|
} |
77 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
78 |
0
|
public void showWarnStyling(boolean showStyling){... |
79 |
0
|
icon.setVisible(showStyling); |
80 |
0
|
if(showStyling){ |
81 |
0
|
layout.addStyleName("ks-message-static"); |
82 |
|
} |
83 |
|
else{ |
84 |
0
|
layout.removeStyleName("ks-message-static"); |
85 |
|
} |
86 |
|
} |
87 |
|
} |