blob: 1753cb7751de463f99c5c6ec93a9ec81bbf7bc1f (
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;
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));
}
}
|