package NET.worlds.scape; import NET.worlds.console.PolledDialog; public class BooleanPropertyEditor extends PropEditor { private String[] choices; private String falseName; private String trueName; private BooleanPropertyEditor(Property property, String falseName, String trueName) { super(property); this.falseName = falseName; this.trueName = trueName; } @Override public PolledDialog edit(EditTile parent, String title) { String[] choices = new String[]{this.falseName, this.trueName}; return new BooleanFieldEditorDialog(parent, title, this.property, choices); } public static Property make(Property property, String falseName, String trueName) { property.setPropertyType(0); return property.setEditor(new BooleanPropertyEditor(property, falseName, trueName)); } }