*/
package com.vaadin.tests.themes.valo;
-import com.vaadin.data.Container;
import com.vaadin.navigator.View;
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
import com.vaadin.server.ThemeResource;
row.setSpacing(true);
addComponent(row);
- Container generatedContainer = ValoThemeUI
- .generateContainer(200, false);
ComboBox combo = new ComboBox("Normal");
combo.setInputPrompt("You can type here");
- combo.setContainerDataSource(generatedContainer);
+ combo.setContainerDataSource(ValoThemeUI.generateContainer(200, false));
combo.setNullSelectionAllowed(false);
- combo.select(generatedContainer.getItemIds().iterator().next());
+ combo.select(combo.getItemIds().iterator().next());
combo.setItemCaptionPropertyId(ValoThemeUI.CAPTION_PROPERTY);
combo.setItemIconPropertyId(ValoThemeUI.ICON_PROPERTY);
combo.setItemIcon(combo.getItemIds().iterator().next(),
combo = new ComboBox();
combo.setInputPrompt("You can type here");
- combo.setContainerDataSource(generatedContainer);
+ combo.setContainerDataSource(ValoThemeUI.generateContainer(200, false));
combo.setNullSelectionAllowed(false);
- combo.select(generatedContainer.getItemIds().iterator().next());
+ combo.select(combo.getItemIds().iterator().next());
combo.setItemCaptionPropertyId(ValoThemeUI.CAPTION_PROPERTY);
combo.setItemIconPropertyId(ValoThemeUI.ICON_PROPERTY);
combo.setWidth("240px");
combo = new ComboBox("Custom color");
combo.setInputPrompt("You can type here");
- combo.setContainerDataSource(generatedContainer);
+ combo.setContainerDataSource(ValoThemeUI.generateContainer(200, false));
combo.setItemCaptionPropertyId(ValoThemeUI.CAPTION_PROPERTY);
combo.setItemIconPropertyId(ValoThemeUI.ICON_PROPERTY);
combo.addStyleName("color1");
combo = new ComboBox("Custom color");
combo.setInputPrompt("You can type here");
- combo.setContainerDataSource(generatedContainer);
+ combo.setContainerDataSource(ValoThemeUI.generateContainer(200, false));
combo.setItemCaptionPropertyId(ValoThemeUI.CAPTION_PROPERTY);
combo.setItemIconPropertyId(ValoThemeUI.ICON_PROPERTY);
combo.addStyleName("color2");
combo = new ComboBox("Custom color");
combo.setInputPrompt("You can type here");
- combo.setContainerDataSource(generatedContainer);
+ combo.setContainerDataSource(ValoThemeUI.generateContainer(200, false));
combo.setItemCaptionPropertyId(ValoThemeUI.CAPTION_PROPERTY);
combo.setItemIconPropertyId(ValoThemeUI.ICON_PROPERTY);
combo.addStyleName("color3");
combo = new ComboBox("Small");
combo.setInputPrompt("You can type here");
- combo.setContainerDataSource(generatedContainer);
+ combo.setContainerDataSource(ValoThemeUI.generateContainer(200, false));
combo.setItemCaptionPropertyId(ValoThemeUI.CAPTION_PROPERTY);
combo.setItemIconPropertyId(ValoThemeUI.ICON_PROPERTY);
combo.addStyleName("small");
combo = new ComboBox("Large");
combo.setInputPrompt("You can type here");
- combo.setContainerDataSource(generatedContainer);
+ combo.setContainerDataSource(ValoThemeUI.generateContainer(200, false));
combo.setItemCaptionPropertyId(ValoThemeUI.CAPTION_PROPERTY);
combo.setItemIconPropertyId(ValoThemeUI.ICON_PROPERTY);
combo.addStyleName("large");