public void bindDisplay(Display display) { this.display = display; display.getFixedValuesToggle().addClickHandler(this); display.setFixedValuesVisible(false); multiListSelect.bindDisplay(display.getDoubleListDisplay()); multiListSelect.bindToggleDisplay(display.getToggleDisplay()); parameterizedFieldPresenter.bindDisplay(display.getParameterizedFieldDisplay()); for (HeaderField field : headerFields) { multiListSelect.addItem(field.getItem()); } multiListSelect.addItem(ParameterizedField.getGenerator(MachineLabelField.BASE_NAME)); }
public void updateViewFromState() { selectItemsInView(savedSelectedFields); display.getFixedValuesInput().setText(savedFixedValues); display.getFixedValuesToggle().setActive(!savedFixedValues.equals("")); parameterizedFieldPresenter.updateViewFromState(); }
private boolean isFixedValuesActive() { return !display.getToggleDisplay().getToggleMultipleLink().isActive() && display.getFixedValuesToggle().isActive(); }
@Override public void onClick(ClickEvent event) { assert event.getSource() == display.getFixedValuesToggle(); display.setFixedValuesVisible(isFixedValuesActive()); }