1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.kuali.student.common.ui.client.widgets.buttongroups; |
17 |
|
|
18 |
|
import org.kuali.student.common.ui.client.mvc.Callback; |
19 |
|
import org.kuali.student.common.ui.client.widgets.KSButton; |
20 |
|
import org.kuali.student.common.ui.client.widgets.buttongroups.ButtonEnumerations.SendCancelEnum; |
21 |
|
import org.kuali.student.common.ui.client.widgets.buttonlayout.ButtonRow; |
22 |
|
|
23 |
|
import com.google.gwt.event.dom.client.ClickEvent; |
24 |
|
import com.google.gwt.event.dom.client.ClickHandler; |
25 |
|
|
|
|
| 0% |
Uncovered Elements: 18 (18) |
Complexity: 5 |
Complexity Density: 0.38 |
|
26 |
|
public class SendCancelGroup extends ButtonGroup<SendCancelEnum>{ |
27 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
28 |
0
|
public SendCancelGroup(Callback<SendCancelEnum> callback){... |
29 |
0
|
layout = new ButtonRow(); |
30 |
0
|
this.addCallback(callback); |
31 |
|
|
32 |
0
|
addButton(SendCancelEnum.CANCEL); |
33 |
0
|
addButtonToSecondaryGroup(SendCancelEnum.SEND); |
34 |
|
|
35 |
0
|
this.initWidget(layout); |
36 |
|
} |
37 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
38 |
0
|
private void addButton(final SendCancelEnum type){... |
39 |
0
|
KSButton button = new KSButton(type.getText(), new ClickHandler(){ |
40 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
41 |
0
|
@Override... |
42 |
|
public void onClick(ClickEvent event) { |
43 |
0
|
sendCallbacks(type); |
44 |
|
} |
45 |
|
}); |
46 |
0
|
layout.addButton(button); |
47 |
0
|
buttonMap.put(type, button); |
48 |
|
} |
49 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
50 |
0
|
private void addButtonToSecondaryGroup(final SendCancelEnum type){... |
51 |
0
|
KSButton button = new KSButton(type.getText(), new ClickHandler(){ |
52 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
53 |
0
|
@Override... |
54 |
|
public void onClick(ClickEvent event) { |
55 |
0
|
sendCallbacks(type); |
56 |
|
} |
57 |
|
}); |
58 |
0
|
((ButtonRow)layout).addButtonToSecondaryGroup(button); |
59 |
0
|
buttonMap.put(type, button); |
60 |
|
} |
61 |
|
} |