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