package NET.worlds.scape; import NET.worlds.console.PolledDialog; public class MaybeNullPropertyEditor extends PropEditor { private Object newOne; private MaybeNullPropertyEditor(Property property, Object newOne) { super(property); this.newOne = newOne; } @Override public PolledDialog edit(EditTile parent, String title) { return new MaybeNullDialog(parent, title, "Create a new instance?", this.property, this.newOne); } public static Property make(Property property, Object newOne) { return property.setEditor(new MaybeNullPropertyEditor(property, newOne)); } }