tabs.addComponent(horizontalSplitsLayout);
HorizontalLayout verticalSplitsLayout = new HorizontalLayout();
verticalSplitsLayout.setCaption("Vertical splits");
VerticalSplitPanel percentagePositionWithPercentageLimitsVertical = new VerticalSplitPanel();
percentagePositionWithPercentageLimitsVertical.setMinSplitPosition(10,
Sizeable.UNITS_PERCENTAGE);
percentagePositionWithPercentageLimitsVertical.setMaxSplitPosition(80,
Sizeable.UNITS_PERCENTAGE);
percentagePositionWithPercentageLimitsVertical
.setFirstComponent(new Label("Min 10 % - 50 % position"));
percentagePositionWithPercentageLimitsVertical
.setSecondComponent(new Label("Max 80 %"));
percentagePositionWithPercentageLimitsVertical.setSplitPosition(50,
Sizeable.UNITS_PERCENTAGE);
verticalSplitsLayout
.addComponent(percentagePositionWithPercentageLimitsVertical);
VerticalSplitPanel pixelPositionWithPercentageLimitsVertical = new VerticalSplitPanel();
pixelPositionWithPercentageLimitsVertical.setMinSplitPosition(10,
Sizeable.UNITS_PERCENTAGE);
pixelPositionWithPercentageLimitsVertical.setMaxSplitPosition(80,
Sizeable.UNITS_PERCENTAGE);
pixelPositionWithPercentageLimitsVertical.setFirstComponent(new Label(
"Min 10 % - 400 px position"));
pixelPositionWithPercentageLimitsVertical.setSecondComponent(new Label(
"Max 80 %"));
pixelPositionWithPercentageLimitsVertical.setSplitPosition(400,
Sizeable.UNITS_PIXELS);
verticalSplitsLayout
.addComponent(pixelPositionWithPercentageLimitsVertical);
VerticalSplitPanel pixelPositionWithPixelLimitsVertical = new VerticalSplitPanel();
pixelPositionWithPixelLimitsVertical.setMinSplitPosition(100,
Sizeable.UNITS_PIXELS);
pixelPositionWithPixelLimitsVertical.setMaxSplitPosition(450,
Sizeable.UNITS_PIXELS);
pixelPositionWithPixelLimitsVertical.setFirstComponent(new Label(
"Min 100 px - 400 px position"));
pixelPositionWithPixelLimitsVertical.setSecondComponent(new Label(
"Max 450 px"));
pixelPositionWithPixelLimitsVertical.setSplitPosition(400,
Sizeable.UNITS_PIXELS);
verticalSplitsLayout.addComponent(pixelPositionWithPixelLimitsVertical);
VerticalSplitPanel percentagePositionWithPixelLimitsVertical = new VerticalSplitPanel();
percentagePositionWithPixelLimitsVertical.setMinSplitPosition(100,
Sizeable.UNITS_PIXELS);
percentagePositionWithPixelLimitsVertical.setMaxSplitPosition(450,
Sizeable.UNITS_PIXELS);
percentagePositionWithPixelLimitsVertical.setFirstComponent(new Label(
"Min 100 px - 30 % position"));
percentagePositionWithPixelLimitsVertical.setSecondComponent(new Label(
"Max 450 px"));
percentagePositionWithPixelLimitsVertical.setSplitPosition(30,
Sizeable.UNITS_PERCENTAGE);
verticalSplitsLayout
.addComponent(percentagePositionWithPixelLimitsVertical);
VerticalSplitPanel percentagePositionWithPercentageLimitsVerticalReversed = new VerticalSplitPanel();
percentagePositionWithPercentageLimitsVerticalReversed
.setMinSplitPosition(10, Sizeable.UNITS_PERCENTAGE);
percentagePositionWithPercentageLimitsVerticalReversed
.setMaxSplitPosition(80, Sizeable.UNITS_PERCENTAGE);
percentagePositionWithPercentageLimitsVerticalReversed
.setFirstComponent(new Label(
"Max 80 % - Reversed 50 % position"));
percentagePositionWithPercentageLimitsVerticalReversed
.setSecondComponent(new Label("Min 10 %"));
percentagePositionWithPercentageLimitsVerticalReversed
.setSplitPosition(50, Sizeable.UNITS_PERCENTAGE, true);
verticalSplitsLayout
.addComponent(percentagePositionWithPercentageLimitsVerticalReversed);
VerticalSplitPanel pixelPositionWithPercentageLimitsVerticalReversed = new VerticalSplitPanel();
pixelPositionWithPercentageLimitsVerticalReversed.setMinSplitPosition(
10, Sizeable.UNITS_PERCENTAGE);
pixelPositionWithPercentageLimitsVerticalReversed.setMaxSplitPosition(
80, Sizeable.UNITS_PERCENTAGE);
pixelPositionWithPercentageLimitsVerticalReversed
.setFirstComponent(new Label(
"Max 80 % - Reversed 400 px position"));
pixelPositionWithPercentageLimitsVerticalReversed
.setSecondComponent(new Label("Min 10 %"));
pixelPositionWithPercentageLimitsVerticalReversed.setSplitPosition(400,
Sizeable.UNITS_PIXELS, true);
verticalSplitsLayout
.addComponent(pixelPositionWithPercentageLimitsVerticalReversed);
VerticalSplitPanel pixelPositionWithPixelLimitsVerticalReversed = new VerticalSplitPanel();
pixelPositionWithPixelLimitsVerticalReversed.setMinSplitPosition(100,
Sizeable.UNITS_PIXELS);
pixelPositionWithPixelLimitsVerticalReversed.setMaxSplitPosition(400,
Sizeable.UNITS_PIXELS);
pixelPositionWithPixelLimitsVerticalReversed
.setFirstComponent(new Label(
"Max 400 px - Reversed 300 px position"));
pixelPositionWithPixelLimitsVerticalReversed
.setSecondComponent(new Label("Min 100 px"));
pixelPositionWithPixelLimitsVerticalReversed.setSplitPosition(300,
Sizeable.UNITS_PIXELS, true);
verticalSplitsLayout
.addComponent(pixelPositionWithPixelLimitsVerticalReversed);
VerticalSplitPanel percentagePositionWithPixelLimitsVerticalReversed = new VerticalSplitPanel();
percentagePositionWithPixelLimitsVerticalReversed.setMinSplitPosition(
100, Sizeable.UNITS_PIXELS);
percentagePositionWithPixelLimitsVerticalReversed.setMaxSplitPosition(
400, Sizeable.UNITS_PIXELS);
percentagePositionWithPixelLimitsVerticalReversed
.setFirstComponent(new Label(
"Max 400 px - Reversed 30 % position"));
percentagePositionWithPixelLimitsVerticalReversed
.setSecondComponent(new Label("Min 100 px"));
percentagePositionWithPixelLimitsVerticalReversed.setSplitPosition(30,
Sizeable.UNITS_PERCENTAGE, true);
verticalSplitsLayout
.addComponent(percentagePositionWithPixelLimitsVerticalReversed);
tabs.addComponent(verticalSplitsLayout);