public ControlPanel() { winSel.setCaption("Controlled window:"); winSel.setContainerDataSource(windowlist); winSel.setValue(windowlist.firstItemId()); winSel.setItemCaptionPropertyId("caption"); addComponent(winSel); addComponent(bf); addComponent(toggleModality); bf.addClickListener(this); toggleModality.addClickListener(this); }
@Override protected void init(VaadinRequest request) { ComboBox themePicker = new ComboBox("Theme", Arrays.asList(themes)); themePicker.setValue(getTheme()); themePicker.addValueChangeListener( new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { String theme = (String) event.getProperty().getValue(); setTheme(theme); } }); setContent(themePicker); }