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;
|
package de.com.baseband.clientboot;
|
||||||
|
|
||||||
public class CBCallbackContainer {
|
public class CBCallbackContainer {
|
||||||
|
private final CBWindow parent;
|
||||||
public String name;
|
public String name;
|
||||||
final CBCallback callback;
|
CBCallback callback;
|
||||||
|
|
||||||
CBCallbackContainer(String name, CBCallback callback) {
|
CBCallbackContainer(CBWindow parent, String name, CBCallback callback) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.callback = callback;
|
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();
|
List<CBCallbackContainer> list = window.options.peek();
|
||||||
if(window.selected == list.size())
|
if(window.selected == list.size())
|
||||||
window.selected++;
|
window.selected++;
|
||||||
list.add(new CBCallbackContainer(name, null));
|
list.add(new CBCallbackContainer(window, name, null));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ClientBoot option(String name, CBCallback callback) {
|
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;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue