createUI((AbstractOrderedLayout) w.getContent());
}
private void createUI(AbstractOrderedLayout layout) {
VerticalLayout ol;
Panel p;
ComboBox cb;
ol = new VerticalLayout();
p = new Panel(ol);
p.setCaption("Combobox without width");
// p.setWidth("100px");
cb = new ComboBox();
// cb.setCaption("A combobox");
// cb.setWidth("100%");
ol.addComponent(cb);
layout.addComponent(p);
ol = new VerticalLayout();
p = new Panel(ol);
p.setCaption("Combobox without width with caption");
// p.setWidth("100px");
cb = new ComboBox();
cb.setCaption("A combobox");
// cb.setWidth("100px");
ol.addComponent(cb);
layout.addComponent(p);
ol = new VerticalLayout();
p = new Panel(ol);
p.setCaption("Combobox 100px wide");
// p.setWidth("100px");
cb = new ComboBox();
// cb.setCaption("A combobox");
cb.setWidth("100px");
ol.addComponent(cb);
layout.addComponent(p);
ol = new VerticalLayout();
p = new Panel(ol);
p.setCaption("Combobox 100px wide with caption");
// p.setWidth("100px");
cb = new ComboBox();
cb.setCaption("A combobox");
cb.setWidth("100px");
ol.addComponent(cb);
layout.addComponent(p);
ol = new VerticalLayout();
p = new Panel(ol);
p.setCaption("Combobox 500px wide");
// p.setWidth("500px");
cb = new ComboBox();
// cb.setCaption("A combobox");
cb.setWidth("500px");
ol.addComponent(cb);
layout.addComponent(p);
ol = new VerticalLayout();
p = new Panel(ol);
p.setCaption("Combobox 500px wide with caption");
// p.setWidth("500px");
cb = new ComboBox();
cb.setCaption("A combobox");
cb.setWidth("500px");
ol.addComponent(cb);
layout.addComponent(p);
ol = new VerticalLayout();
p = new Panel(ol);
p.setCaption("Combobox 100% wide inside 200px panel");
p.setWidth("200px");
ol.setWidth("100%");
cb = new ComboBox();
// cb.setCaption("A combobox");
cb.setWidth("100%");
// cb.setWidth("500px");
ol.addComponent(cb);
layout.addComponent(p);
ol = new VerticalLayout();
p = new Panel(ol);
p.setCaption("Combobox 100% wide inside 200px panel with caption");
p.setWidth("200px");
ol.setWidth("100%");
cb = new ComboBox();
cb.setCaption("A combobox");
cb.setWidth("100%");
ol.addComponent(cb);