blob: ea661caaf5d0c7ddc4090390aa49c09a85dd4b67 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package NET.worlds.scape;
class BooleanFieldEditorDialog extends CheckboxEditorDialog {
private Property property;
BooleanFieldEditorDialog(EditTile parent, String title, Property property, String[] choices) {
super(parent, title, choices);
this.property = property;
this.ready();
}
@Override
protected int getValue() {
return this.property.get() ? 1 : 0;
}
@Override
protected void setValue(int choice) {
this.parent.addUndoableSet(this.property, new Boolean(choice == 1));
}
}
|