This commit is contained in:
parent
74abba5e80
commit
5044570037
2 changed files with 11 additions and 4 deletions
|
@ -1,11 +1,18 @@
|
|||
package de.com.baseband.clientboot;
|
||||
|
||||
public class CBCallbackContainer {
|
||||
private final CBWindow parent;
|
||||
public String name;
|
||||
final CBCallback callback;
|
||||
CBCallback callback;
|
||||
|
||||
CBCallbackContainer(String name, CBCallback callback) {
|
||||
CBCallbackContainer(CBWindow parent, String name, CBCallback callback) {
|
||||
this.name = name;
|
||||
this.callback = callback;
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
public void toLabel() {
|
||||
callback = null;
|
||||
parent.checkSelected(false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,12 +38,12 @@ public class ClientBoot {
|
|||
List<CBCallbackContainer> list = window.options.peek();
|
||||
if(window.selected == list.size())
|
||||
window.selected++;
|
||||
list.add(new CBCallbackContainer(name, null));
|
||||
list.add(new CBCallbackContainer(window, name, null));
|
||||
return this;
|
||||
}
|
||||
|
||||
public ClientBoot option(String name, CBCallback callback) {
|
||||
window.options.peek().add(new CBCallbackContainer(name, callback));
|
||||
window.options.peek().add(new CBCallbackContainer(window, name, callback));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue