1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.kuali.student.common.ui.client.widgets; |
17 |
|
|
18 |
|
import com.google.gwt.event.dom.client.ClickHandler; |
19 |
|
import com.google.gwt.event.dom.client.HasClickHandlers; |
20 |
|
import com.google.gwt.event.dom.client.HasMouseOutHandlers; |
21 |
|
import com.google.gwt.event.dom.client.HasMouseOverHandlers; |
22 |
|
import com.google.gwt.user.client.ui.Composite; |
23 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
24 |
|
public abstract class KSButtonAbstract extends Composite implements HasClickHandlers, HasMouseOverHandlers, HasMouseOutHandlers{ |
25 |
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 3 |
Complexity Density: 0.75 |
|
26 |
|
public static enum ButtonStyle{ |
27 |
|
PRIMARY("ks-button-primary", "ks-button-primary-disabled"), |
28 |
|
SECONDARY("ks-button-secondary", "ks-button-secondary-disabled"), |
29 |
|
PRIMARY_SMALL("ks-button-primary-small", "ks-button-primary-small-disabled"), |
30 |
|
SECONDARY_SMALL("ks-button-secondary-small", "ks-button-secondary-small-disabled"), |
31 |
|
FORM_SMALL("ks-form-button-small", null), |
32 |
|
FORM_LARGE("ks-form-button-large", null), |
33 |
|
HELP("ks-form-module-elements-help", null), |
34 |
|
DELETE("ks-form-module-elements-delete", null), |
35 |
|
ANCHOR_LARGE_CENTERED("ks-link-large", "ks-link-large-disabled"), |
36 |
|
DEFAULT_ANCHOR("ks-link", "ks-link-disabled"); |
37 |
|
|
38 |
|
private String style; |
39 |
|
private String disabledStyle; |
40 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
41 |
0
|
private ButtonStyle(String style, String disabledStyle){... |
42 |
0
|
this.style = style; |
43 |
0
|
this.disabledStyle = disabledStyle; |
44 |
|
} |
45 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
46 |
0
|
public String getStyle(){... |
47 |
0
|
return style; |
48 |
|
} |
49 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
50 |
0
|
public String getDisabledStyle() {... |
51 |
0
|
return disabledStyle; |
52 |
|
} |
53 |
|
}; |
54 |
|
|
55 |
|
public abstract boolean isEnabled(); |
56 |
|
|
57 |
|
public abstract void setEnabled(boolean enabled); |
58 |
|
|
59 |
|
public abstract void setText(String text); |
60 |
|
|
61 |
|
public abstract void init(); |
62 |
|
|
63 |
|
public abstract void init(String text); |
64 |
|
|
65 |
|
public abstract void init(String text, ButtonStyle style); |
66 |
|
|
67 |
|
public abstract void init(String text, ClickHandler handler); |
68 |
|
|
69 |
|
public abstract void init(String text, ButtonStyle style, ClickHandler handler); |
70 |
|
} |