table.setPageLength(50);
setMainWindow(new LegacyWindow(""));
getMainWindow().getContent().setSizeUndefined();
Component l2 = null;
for (int i = 0; i < 10; i++) {
l2 = l("X" + i);
getMainWindow().addComponent(l2);
}
final Component x9 = l2;
HorizontalLayout horizontalLayout = new HorizontalLayout();
Component l = null;
for (int i = 0; i < 10; i++) {
l = l("Y" + i);
horizontalLayout.addComponent(l);
}
getMainWindow().addComponent(horizontalLayout);
final Component y9 = l;
VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
final Window window = new Window();
window.setHeight("500px");
window.setWidth("500px");
window.setPositionX(200);
window.setPositionY(200);
layout.addComponent(new Button("Scroll mainwin to X9",
new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
getMainWindow().scrollIntoView(x9);
}
}));
layout.addComponent(new Button("Scroll mainwin to Y9",
new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
getMainWindow().scrollIntoView(y9);
}
}));
VerticalLayout panelLayout = new VerticalLayout();
panelLayout.setMargin(true);
Panel panel = new Panel("scrollable panel", panelLayout);
panel.setHeight(400, Panel.UNITS_PIXELS);
panel.setScrollLeft(50);
panel.setScrollTop(50);
panelLayout.setSizeUndefined();
layout.addComponent(l("Spacer", 500, 500));
l2 = null;
for (int i = 0; i < 10; i++) {
l2 = l("X" + i);
panelLayout.addComponent(l2);
}
final Component x29 = l2;
horizontalLayout = new HorizontalLayout();
l = null;
for (int i = 0; i < 10; i++) {
l = l("Y" + i);
horizontalLayout.addComponent(l);
}
panelLayout.addComponent(horizontalLayout);
final Component y29 = l;
((VerticalLayout) getMainWindow().getContent()).addComponent(
new Button("Scroll win to X9", new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {