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() { Boolean value = (Boolean) this.property.get(); return (value != null && value) ? 1 : 0; } @Override protected void setValue(int choice) { this.parent.addUndoableSet(this.property, new Boolean(choice == 1)); } }