mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-22 21:19:56 +00:00
Generics for everyone \o/
This commit is contained in:
1 parent
ac9344cbda
commit
23ed2dcaea
55 files changed
+164
-163
No files matched your search
@@ -49,13 +49,12 @@ public class ControlList<T> extends Control implements IControlValue<T> {
|
||||
public void setOptions(final Collection<T> options) {
|
||||
this.deleteAllChildren();
|
||||
this.allOptions.clear();
|
||||
int i = 0;
|
||||
for (final T option : options) {
|
||||
final IWidget optionWidget = ((ControlListBox) this.getParent()).createOption(option, 0);
|
||||
@SuppressWarnings("unchecked")
|
||||
final IWidget optionWidget = ((ControlListBox<T>) this.getParent()).createOption(option, 0);
|
||||
if (optionWidget != null) {
|
||||
this.allOptions.put(option, optionWidget);
|
||||
}
|
||||
++i;
|
||||
}
|
||||
this.filterOptions();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user