package NET.worlds.scape; import NET.worlds.console.PolledDialog; public class IntegerPropertyEditor extends PropEditor { boolean rangeLimits = false; int minVal; int maxVal; private IntegerPropertyEditor(Property property) { super(property); } private IntegerPropertyEditor(Property property, int minVal, int maxVal) { super(property); this.rangeLimits = true; this.minVal = minVal; this.maxVal = maxVal; } @Override public PolledDialog edit(EditTile parent, String title) { return new IntegerFieldEditorDialog(parent, title, this.property, this); } public static Property make(Property property) { property.setPropertyType(1); return property.setEditor(new IntegerPropertyEditor(property)); } public static Property make(Property property, int minVal, int maxVal) { property.setPropertyType(1); return property.setEditor(new IntegerPropertyEditor(property, minVal, maxVal)); } }