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 org.kuali.student.common.ui.client.widgets.impl.KSButtonImpl;
19
20 import com.google.gwt.core.client.GWT;
21 import com.google.gwt.event.dom.client.ClickHandler;
22 import com.google.gwt.event.dom.client.MouseOutHandler;
23 import com.google.gwt.event.dom.client.MouseOverHandler;
24 import com.google.gwt.event.shared.HandlerRegistration;
25
26
27
28
29
30
31
32
33
34 public class KSButton extends KSButtonAbstract{
35
36 KSButtonAbstract button = GWT.create(KSButtonImpl.class);
37
38 public boolean isEnabled() {
39 return button.isEnabled();
40 }
41
42 public void setEnabled(boolean enabled) {
43 button.setEnabled(enabled);
44 }
45
46 public KSButton(){
47 this.init();
48 this.initWidget(button);
49 }
50
51 public KSButton(String text, ClickHandler handler){
52 this.init(text, handler);
53 this.initWidget(button);
54 }
55
56 public KSButton(String text){
57 this.init(text);
58 this.initWidget(button);
59 }
60
61 public KSButton(String text, ButtonStyle style){
62 this.init(text, style);
63 this.initWidget(button);
64 }
65
66 public KSButton(String text, ButtonStyle style, ClickHandler handler){
67 this.init(text, style, handler);
68 this.initWidget(button);
69 }
70
71 public void setText(String text){
72 button.setText(text);
73 }
74
75 @Override
76 public HandlerRegistration addClickHandler(ClickHandler handler) {
77 return button.addClickHandler(handler);
78 }
79
80 @Override
81 public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) {
82 return button.addMouseOverHandler(handler);
83 }
84
85 @Override
86 public HandlerRegistration addMouseOutHandler(MouseOutHandler handler) {
87 return button.addMouseOutHandler(handler);
88 }
89
90 @Override
91 public void init() {
92 button.init();
93 }
94
95 @Override
96 public void init(String text) {
97 button.init(text);
98 }
99
100 @Override
101 public void init(String text, ButtonStyle style) {
102 button.init(text, style);
103 }
104
105 public void init(String text, ButtonStyle style, ClickHandler handler) {
106 button.init(text, style, handler);
107 }
108
109 @Override
110 public void init(String text, ClickHandler handler) {
111 button.init(text, handler);
112 }
113
114 @Override
115 public void addStyleName(String style) {
116 button.addStyleName(style);
117 }
118
119 @Override
120 public void removeStyleName(String style) {
121 button.removeStyleName(style);
122 }
123
124 @Override
125 public void setStyleName(String style) {
126 button.setStyleName(style);
127 }
128 }