f = new EasyForm("Form and Run") f.addTextField("first") f['first'] = "First" f.addTextField("last") f['last'] = "Last" f.addButton("Go!", "run") f f['last'].reverse() + '...' + f['first'] f['first'] = 'Beaker' f['last'] = 'Berzelius' f1 = new EasyForm("Form and Run") f1.addTextField("first", 15) f1.addTextField("last", 15).onInit({f1['last'] = "setinit1"}).onChange({text -> f1['first'] = text + " extra"}) button = f1.addButton("action", "action_button") button.actionPerformed = {f1['last'] = 'action done'} f1 f1['last'] + ", " + f1['first'] f1['last'] = "new Value" f1['first'] = "new Value2" g = new EasyForm("Field Types") g.addTextField("Short Text Field", 10) g.addTextField("Text Field") g.addPasswordField("Password Field", 10) g.addTextArea("Text Area") g.addTextArea("Tall Text Area", 10, 5) g.addCheckBox("Check Box") options = ["a", "b", "c", "d"] g.addComboBox("Combo Box", options) g.addComboBox("Editable Combo", options, true) g.addList("List", options) g.addList("List Single", options, false) g.addList("List Two Row", options, 2) g.addCheckBoxes("Check Boxes", options) g.addCheckBoxes("Check Boxes H", options, EasyForm.HORIZONTAL) g.addRadioButtons("Radio Buttons", options) g.addRadioButtons("Radio Buttons H", options, EasyForm.HORIZONTAL) g.addDatePicker("Date") g.addButton("Go!", "run2") g result = [:] g.keySet().each { result[it] = g[it] } result gdp = new EasyForm("Field Types") gdp.addDatePicker("Date") gdp gdp['Date'].getClass() easyForm = new EasyForm("Field Types") // Setup date via String (format is yyyyMMdd) also works easyForm.addDatePicker("Date").setDate(new Date()) easyForm import com.twosigma.beakerx.widget.IntSlider w = new IntSlider() widgetForm = new EasyForm("pyhton widgets") widgetForm.addButton("Press", "widget_test") widgetForm.addWidget("IntSlider",w) widgetForm widgetForm['IntSlider']