private NativeSelect layoutSelect;\r
private Layout layout;\r
private VerticalLayout verticalLayout;\r
+ private HorizontalLayout horizontalLayout;\r
private GridLayout gridLayout;\r
private FormLayout formLayout;\r
private List<AbstractField> components = new ArrayList<AbstractField>();\r
\r
private void createComponents() {\r
TextField tfUndefWide = new TextField(\r
- "Undefined wide text field with a very long caption, longer than the field and the layout.");\r
+ "Undefined wide text field with a very long caption, longer than the field and the layout. Lorem ipsum dolor sit amet.");\r
TextField tf100pxWide = new TextField(\r
"100 px wide text field with a very long caption, longer than 100px.");\r
tf100pxWide.setWidth("100px");\r
\r
+ TextField tf500pxWide = new TextField(\r
+ "500 px wide text field with a very long caption, longer than 500px. Lorem ipsum dolor sit amet, consectetur adipiscing elit.");\r
+ tf500pxWide.setWidth("500px");\r
+\r
components.add(tfUndefWide);\r
components.add(tf100pxWide);\r
+ components.add(tf500pxWide);\r
\r
}\r
\r
verticalLayout.setStyleName("borders");\r
}\r
l = verticalLayout;\r
+ } else if (layoutClass == HorizontalLayout.class) {\r
+ if (horizontalLayout == null) {\r
+ horizontalLayout = new HorizontalLayout();\r
+ horizontalLayout.setStyleName("borders");\r
+ }\r
+ l = horizontalLayout;\r
} else if (layoutClass == GridLayout.class) {\r
if (gridLayout == null) {\r
gridLayout = new GridLayout();\r
layoutSelect.setItemCaptionPropertyId(CAPTION);\r
layoutSelect.setNullSelectionAllowed(false);\r
\r
- for (Class cls : new Class[] { VerticalLayout.class, GridLayout.class,\r
- CssLayout.class, FormLayout.class }) {\r
+ for (Class<?> cls : new Class[] { HorizontalLayout.class,\r
+ VerticalLayout.class, GridLayout.class, CssLayout.class,\r
+ FormLayout.class }) {\r
for (String width : new String[] { "400px", "auto" }) {\r
Object id = layoutSelect.addItem();\r
Item i = layoutSelect.getItem(id);\r