blob: 28d5a456b12ddd92c7557a678ba9cc627a02e1ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package com.vaadin.tests.components.window;
import com.vaadin.tests.components.AbstractTestCase;
import com.vaadin.ui.Button;
import com.vaadin.ui.LegacyWindow;
import com.vaadin.v7.ui.Table;
public class WindowScrollingUp extends AbstractTestCase {
@Override
protected String getDescription() {
return "Scroll down, click 'up' and the view should scroll to the top";
}
@Override
protected Integer getTicketNumber() {
return 4206;
}
@Override
public void init() {
Table table = new Table();
table.setPageLength(50);
final Button up = new Button("up");
up.addClickListener(event -> up.getUI().setScrollTop(0));
setMainWindow(new LegacyWindow(""));
getMainWindow().addComponent(table);
getMainWindow().addComponent(up);
}
}
|