Clover Coverage Report - KS Common 1.2.1-SNAPSHOT (Aggregated)
Coverage timestamp: Wed Nov 2 2011 04:55:08 EST
../../../../../../../img/srcFileCovDistChart0.png 29% of files have more coverage
29   142   20   1.45
0   90   0.69   20
20     1  
1    
 
  KSButton       Line # 36 29 0% 20 49 0% 0.0
 
No Tests
 
1    /**
2    * Copyright 2010 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10    * software distributed under the License is distributed on an "AS IS"
11    * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12    * or implied. See the License for the specific language governing
13    * permissions and limitations under the License.
14    */
15   
16    package org.kuali.student.common.ui.client.widgets;
17   
18    import org.kuali.student.common.ui.client.util.DebugIdUtils;
19    import org.kuali.student.common.ui.client.widgets.impl.KSButtonImpl;
20   
21    import com.google.gwt.core.client.GWT;
22    import com.google.gwt.event.dom.client.ClickHandler;
23    import com.google.gwt.event.dom.client.MouseOutHandler;
24    import com.google.gwt.event.dom.client.MouseOverHandler;
25    import com.google.gwt.event.shared.HandlerRegistration;
26   
27    /**
28    * KSButton wraps gwt Button. This class provides most of the same functionality, but sets
29    * KS css styles for its default look and a variety of button events (for improved browser
30    * compatibility and customizability). An image can be also be added to a KSButton (an
31    * improvement over gwt Button).
32    *
33    * @author Kuali Student Team
34    *
35    */
 
36    public class KSButton extends KSButtonAbstract {
37   
38    KSButtonAbstract button = GWT.create(KSButtonImpl.class);
39   
 
40  0 toggle public boolean isEnabled() {
41  0 return button.isEnabled();
42    }
43   
 
44  0 toggle public void setEnabled(boolean enabled) {
45  0 button.setEnabled(enabled);
46    }
47   
 
48  0 toggle public KSButton() {
49  0 this.init();
50  0 this.initWidget(button);
51    }
52   
 
53  0 toggle public KSButton(String text, ClickHandler handler) {
54  0 this.init(text, handler);
55  0 this.initWidget(button);
56  0 button.ensureDebugId(DebugIdUtils.createWebDriverSafeDebugId(text));
57    }
58   
 
59  0 toggle public KSButton(String text) {
60  0 this.init(text);
61  0 this.initWidget(button);
62  0 button.ensureDebugId(DebugIdUtils.createWebDriverSafeDebugId(text));
63    }
64   
 
65  0 toggle public KSButton(String text, ButtonStyle style) {
66  0 this.init(text, style);
67  0 this.initWidget(button);
68  0 button.ensureDebugId(DebugIdUtils.createWebDriverSafeDebugId(text));
69    }
70   
 
71  0 toggle public KSButton(String text, ButtonStyle style, ClickHandler handler) {
72  0 this.init(text, style, handler);
73  0 this.initWidget(button);
74  0 button.ensureDebugId(DebugIdUtils.createWebDriverSafeDebugId(text));
75    }
76   
 
77  0 toggle public void setText(String text) {
78  0 button.setText(text);
79    }
80   
 
81  0 toggle @Override
82    public HandlerRegistration addClickHandler(ClickHandler handler) {
83  0 return button.addClickHandler(handler);
84    }
85   
 
86  0 toggle @Override
87    public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) {
88  0 return button.addMouseOverHandler(handler);
89    }
90   
 
91  0 toggle @Override
92    public HandlerRegistration addMouseOutHandler(MouseOutHandler handler) {
93  0 return button.addMouseOutHandler(handler);
94    }
95   
 
96  0 toggle @Override
97    public void init() {
98  0 button.init();
99    }
100   
 
101  0 toggle @Override
102    public void init(String text) {
103  0 button.init(text);
104    }
105   
 
106  0 toggle @Override
107    public void init(String text, ButtonStyle style) {
108  0 button.init(text, style);
109    }
110   
 
111  0 toggle public void init(String text, ButtonStyle style, ClickHandler handler) {
112  0 button.init(text, style, handler);
113    }
114   
 
115  0 toggle @Override
116    public void init(String text, ClickHandler handler) {
117  0 button.init(text, handler);
118    }
119   
 
120  0 toggle @Override
121    public void addStyleName(String style) {
122  0 button.addStyleName(style);
123    }
124   
 
125  0 toggle @Override
126    public void removeStyleName(String style) {
127  0 button.removeStyleName(style);
128    }
129   
 
130  0 toggle @Override
131    public void setStyleName(String style) {
132  0 button.setStyleName(style);
133    }
134   
 
135  0 toggle @Override
136    protected void onEnsureDebugId(String baseID) {
137  0 button.ensureDebugId(baseID);
138    }
139   
140   
141   
142    }