private void populateTests() { display.getTestSelection().deselectAll(); display.getTestTable().clear(); JSONArray tests = staticData.getData("tests").isArray(); for (JSONObject test : new JSONArrayList<JSONObject>(tests)) { if (!includeExperimentalTests() && test.get("experimental").isBoolean().booleanValue()) { continue; } String testType = test.get("test_type").isString().stringValue(); if (testType.equals(getSelectedTestType())) { display.getTestTable().addRow(test); } } }
public void bindDisplay(Display display) { this.display = display; display.getTestTypeSelect().addItem(CLIENT_TYPE, CLIENT_TYPE); display.getTestTypeSelect().addItem(SERVER_TYPE, SERVER_TYPE); display.getTestTypeSelect().addChangeHandler(this); display.getTestTable().setWidgetFactory(this); display.getTestTable().addListener(this); populateTests(); display.getTestSelection().addListener(this); }
public void setEnabled(boolean enabled) { this.enabled = enabled; display.getTestTypeSelect().setEnabled(enabled); display.getTestTable().refreshWidgets(); }