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
19 import java.util.List;
20
21 import org.kuali.student.common.ui.client.mvc.Callback;
22 import org.kuali.student.common.ui.client.widgets.impl.KSDropDownImpl;
23 import org.kuali.student.common.ui.client.widgets.list.KSSelectItemWidgetAbstract;
24 import org.kuali.student.common.ui.client.widgets.list.ListItems;
25 import org.kuali.student.common.ui.client.widgets.list.SelectionChangeHandler;
26
27 import com.google.gwt.core.client.GWT;
28 import com.google.gwt.event.dom.client.BlurHandler;
29 import com.google.gwt.event.dom.client.FocusHandler;
30 import com.google.gwt.event.shared.HandlerRegistration;
31 import com.google.gwt.user.client.ui.Widget;
32
33
34
35
36
37
38
39
40
41 public class KSDropDown extends KSSelectItemWidgetAbstract{
42
43 KSSelectItemWidgetAbstract dropDown = GWT.create(KSDropDownImpl.class);
44
45
46
47
48 public KSDropDown(){
49 this.initWidget(dropDown);
50 }
51
52
53
54
55
56
57 @Override
58 public void selectItem(String id) {
59 dropDown.selectItem(id);
60 }
61
62
63
64
65 @Override
66 public void deSelectItem(String id) {
67 dropDown.deSelectItem(id);
68 }
69
70
71
72
73 @Override
74 public List<String> getSelectedItems() {
75 return dropDown.getSelectedItems();
76 }
77
78
79
80
81 @Override
82 public String getSelectedItem() {
83 return dropDown.getSelectedItem();
84 }
85
86
87
88
89 @Override
90 public void onLoad() {
91 dropDown.onLoad();
92 }
93
94
95
96
97 @Override
98 public void setListItems(ListItems listItems) {
99 dropDown.setListItems(listItems);
100 }
101
102
103
104
105 public HandlerRegistration addSelectionChangeHandler(SelectionChangeHandler selectionHandler) {
106 return dropDown.addSelectionChangeHandler(selectionHandler);
107 }
108
109
110
111
112 public ListItems getListItems() {
113 return dropDown.getListItems();
114 }
115
116
117
118
119 public String getName() {
120 return dropDown.getName();
121 }
122
123
124
125
126 @Override
127 public void setName(String name) {
128 dropDown.setName(name);
129 }
130
131 public void setEnabled(boolean b) {
132 dropDown.setEnabled(b);
133 }
134
135 @Override
136 public boolean isEnabled() {
137 return dropDown.isEnabled();
138 }
139
140 public boolean isBlankFirstItem() {
141 if (dropDown instanceof KSDropDownImpl){
142 return ((KSDropDownImpl)dropDown).isBlankFirstItem();
143 } else {
144 return false;
145 }
146 }
147
148
149
150
151
152
153 public void setBlankFirstItem(boolean blankFirstItem) {
154 if (dropDown instanceof KSDropDownImpl){
155 ((KSDropDownImpl)dropDown).setBlankFirstItem(blankFirstItem);
156 }
157 }
158
159 @Override
160 public void redraw() {
161 dropDown.redraw();
162 }
163
164 @Override
165 public HandlerRegistration addFocusHandler(FocusHandler handler) {
166 return dropDown.addFocusHandler(handler);
167 }
168
169 @Override
170 public HandlerRegistration addBlurHandler(BlurHandler handler) {
171 return dropDown.addBlurHandler(handler);
172 }
173
174 @Override
175 public void addWidgetReadyCallback(Callback<Widget> callback) {
176 dropDown.addWidgetReadyCallback(callback);
177 }
178
179 @Override
180 public boolean isInitialized() {
181 return dropDown.isInitialized();
182 }
183
184 @Override
185 public void setInitialized(boolean initialized) {
186 dropDown.setInitialized(initialized);
187 }
188
189 @Override
190 public void clear() {
191 dropDown.clear();
192 }
193 }