DefaultSwingScriptHelper
class has the following additional methods:String
propertyBoolean
propertyInteger
propertyFloat
propertypublic int execute() { Integer value = helper.askForIntProperty("Value", 0, 100, 1); if (value != null) { return value; } else { return 0; } }
public int execute() { PropertySetter setter = helper.getPropertySetter("Set Values"); setter.addProperty("int", "Int Value", PropertyTypes.TYPE_INT, 0, 100, 1); setter.addProperty("bool", "Boolean Value", PropertyTypes.TYPE_BOOLEAN); setter.askForProperties(); int i = setter.getIntProperty("int", 0); boolean b = setter.getBooleanroperty("bool"); if (b) { return i; } else { return 0; } }
Copyright 2019-2020 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence