@Override public void setDisplayerList(Set<String> displayerNames) { displayerList.clear(); for (String name : displayerNames) { displayerList.addItem(name); } }
protected Collection<Framework> getFrameworks() { if (framework.getValue().equalsIgnoreCase("(Framework)")) { return Collections.emptyList(); } return new ArrayList<Framework>() { { add(Framework.valueOf(framework.getValue().toUpperCase())); } }; }
protected void setFramework(final Collection<Framework> frameworks) { if (frameworks != null && !frameworks.isEmpty()) { final Framework framework = frameworks.iterator().next(); for (int i = 0; i < this.framework.getItemCount(); i++) { if (this.framework.getItemText(i).equalsIgnoreCase(framework.toString())) { this.framework.setSelectedIndex(i); return; } } } framework.setSelectedIndex(0); }
@Override public void setOrganizationalUnitEnabled(final boolean enabled) { organizationalUnitDropdown.setEnabled(enabled); }
@Override public String getOrganizationalUnit(final int index) { return organizationalUnitDropdown.getValue(index); }
@Override public int getSelectedOrganizationalUnit() { return organizationalUnitDropdown.getSelectedIndex(); }
@Override public void addOrganizationalUnit(final String item, final String value) { organizationalUnitDropdown.addItem(item, value); }
@Override public void addOrganizationalUnitSelectEntry() { organizationalUnitDropdown.addItem(CoreConstants.INSTANCE.SelectEntry()); }
@Override public void setSelectorVisible(boolean visible) { displayerList.setVisible(visible); }
@UiHandler("displayerList") protected void onDisplayerSelected(ChangeEvent event) { presenter.selectDisplayer(displayerList.getSelectedValue()); }