1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.common.ui.client.widgets.list; |
17 | |
|
18 | |
import java.util.List; |
19 | |
|
20 | |
import org.kuali.student.common.ui.client.mvc.Callback; |
21 | |
import org.kuali.student.common.ui.client.widgets.list.impl.KSCheckBoxListImpl; |
22 | |
|
23 | |
import com.google.gwt.core.client.GWT; |
24 | |
import com.google.gwt.event.dom.client.BlurHandler; |
25 | |
import com.google.gwt.event.dom.client.FocusHandler; |
26 | |
import com.google.gwt.event.dom.client.HasBlurHandlers; |
27 | |
import com.google.gwt.event.dom.client.HasFocusHandlers; |
28 | |
import com.google.gwt.event.shared.HandlerRegistration; |
29 | |
import com.google.gwt.user.client.ui.Widget; |
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
public class KSCheckBoxList extends KSSelectItemWidgetAbstract implements HasBlurHandlers, HasFocusHandlers { |
39 | 0 | private KSCheckBoxListImpl selectItemWidget = GWT.create(KSCheckBoxListImpl.class); |
40 | |
|
41 | |
|
42 | 0 | public KSCheckBoxList(String name) { |
43 | 0 | initWidget(selectItemWidget); |
44 | 0 | selectItemWidget.setName(name); |
45 | 0 | } |
46 | |
|
47 | 0 | public KSCheckBoxList() { |
48 | 0 | initWidget(selectItemWidget); |
49 | 0 | } |
50 | |
|
51 | |
|
52 | |
|
53 | |
|
54 | |
public void deSelectItem(String id) { |
55 | 0 | selectItemWidget.deSelectItem(id); |
56 | 0 | } |
57 | |
|
58 | |
|
59 | |
|
60 | |
|
61 | |
public List<String> getSelectedItems() { |
62 | 0 | return selectItemWidget.getSelectedItems(); |
63 | |
} |
64 | |
|
65 | |
|
66 | |
|
67 | |
|
68 | |
public void selectItem(String id) { |
69 | 0 | selectItemWidget.selectItem(id); |
70 | 0 | } |
71 | |
|
72 | |
public void setListItems(ListItems listItems) { |
73 | 0 | selectItemWidget.setListItems(listItems); |
74 | 0 | } |
75 | |
|
76 | |
|
77 | |
|
78 | |
|
79 | |
|
80 | |
public void setColumnSize(int cols){ |
81 | 0 | selectItemWidget.setColumnSize(cols); |
82 | 0 | } |
83 | |
|
84 | 0 | public void setMultipleSelect(boolean isMultipleSelect) {} |
85 | |
|
86 | |
|
87 | |
|
88 | |
|
89 | |
|
90 | |
|
91 | |
@Override |
92 | 0 | public void onLoad() {} |
93 | |
|
94 | |
public HandlerRegistration addSelectionChangeHandler(SelectionChangeHandler handler) { |
95 | 0 | return selectItemWidget.addSelectionChangeHandler(handler); |
96 | |
} |
97 | |
|
98 | |
public ListItems getListItems() { |
99 | 0 | return selectItemWidget.getListItems(); |
100 | |
} |
101 | |
|
102 | |
public String getName() { |
103 | 0 | return selectItemWidget.getName(); |
104 | |
} |
105 | |
|
106 | |
public void setName(String name) { |
107 | 0 | selectItemWidget.setName(name); |
108 | 0 | } |
109 | |
|
110 | |
@Override |
111 | |
public void setEnabled(boolean b) { |
112 | 0 | selectItemWidget.setEnabled(b); |
113 | 0 | } |
114 | |
|
115 | |
@Override |
116 | |
public boolean isEnabled() { |
117 | 0 | return selectItemWidget.isEnabled(); |
118 | |
} |
119 | |
|
120 | |
@Override |
121 | |
public boolean isMultipleSelect() { |
122 | 0 | return selectItemWidget.isMultipleSelect(); |
123 | |
} |
124 | |
|
125 | |
@Override |
126 | |
public void redraw() { |
127 | 0 | selectItemWidget.redraw(); |
128 | 0 | } |
129 | |
|
130 | |
@Override |
131 | |
public void clear() { |
132 | 0 | selectItemWidget.clear(); |
133 | 0 | } |
134 | |
|
135 | |
@Override |
136 | |
public HandlerRegistration addBlurHandler(BlurHandler handler) { |
137 | 0 | return selectItemWidget.addBlurHandler(handler); |
138 | |
} |
139 | |
|
140 | |
@Override |
141 | |
public HandlerRegistration addFocusHandler(FocusHandler handler) { |
142 | 0 | return selectItemWidget.addFocusHandler(handler); |
143 | |
} |
144 | |
|
145 | |
public void addWidgetReadyCallback(Callback<Widget> callback) { |
146 | 0 | selectItemWidget.addWidgetReadyCallback(callback); |
147 | 0 | } |
148 | |
|
149 | |
public boolean isInitialized() { |
150 | 0 | return selectItemWidget.isInitialized(); |
151 | |
} |
152 | |
|
153 | |
public void setInitialized(boolean initialized) { |
154 | 0 | selectItemWidget.setInitialized(initialized); |
155 | 0 | } |
156 | |
|
157 | |
|
158 | |
|
159 | |
|
160 | |
|
161 | |
|
162 | |
|
163 | |
|
164 | |
public void setIgnoreMultipleAttributes(boolean ignoreMultiple){ |
165 | 0 | selectItemWidget.setIgnoreMultipleAttributes(ignoreMultiple); |
166 | 0 | } |
167 | |
} |
168 | |
|
169 | |
|