package NET.worlds.scape; class StringFieldEditorDialog extends FieldEditorDialog { Property property; StringFieldEditorDialog(EditTile parent, String title, Property property) { super(parent, title); this.property = property; this.ready(); } @Override protected String getValue() { String s = (String)this.property.get(); return s != null ? s : ""; } @Override protected boolean setValue(String text) { if (text.length() == 0) { if (!this.property.canSetNull()) { return false; } text = null; } this.parent.addUndoableSet(this.property, text); return true; } }