|
|
|
|
|
|
|
|
[source, java] |
|
|
[source, java] |
|
|
---- |
|
|
---- |
|
|
HorizontalLayout fittingLayout = new HorizontalLayout(); |
|
|
HorizontalLayout fittingLayout = new HorizontalLayout(); |
|
|
fittingLayout.setWidth(Sizeable.SIZE_UNDEFINED, 0); // Default |
|
|
|
|
|
|
|
|
fittingLayout.setWidthUndefined(); // Default, can be omitted |
|
|
fittingLayout.setSpacing(false); // Compact layout |
|
|
fittingLayout.setSpacing(false); // Compact layout |
|
|
fittingLayout.addComponent(new Button("Small")); |
|
|
fittingLayout.addComponent(new Button("Small")); |
|
|
fittingLayout.addComponent(new Button("Medium-sized")); |
|
|
fittingLayout.addComponent(new Button("Medium-sized")); |