blob: 2eba4154185b6ca12c838b73692d7865e93cc000 (
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
/*
@ITMillApache2LicenseForJavaFiles@
*/
package com.vaadin.terminal.gwt.client;
import com.vaadin.terminal.gwt.client.RenderInformation.Size;
/**
* Contains information about render area.
*/
public class RenderSpace extends Size {
private int scrollBarSize = 0;
public RenderSpace(int width, int height) {
super(width, height);
}
public RenderSpace() {
}
public RenderSpace(int width, int height, boolean useNativeScrollbarSize) {
super(width, height);
if (useNativeScrollbarSize) {
scrollBarSize = Util.getNativeScrollbarSize();
}
}
/**
* Returns pixels available vertically for contained widget, including
* possible scrollbars.
*/
@Override
public int getHeight() {
return super.getHeight();
}
/**
* Returns pixels available horizontally for contained widget, including
* possible scrollbars.
*/
@Override
public int getWidth() {
return super.getWidth();
}
/**
* In case containing block has oveflow: auto, this method must return
* number of pixels used by scrollbar. Returning zero means either that no
* scrollbar will be visible.
*/
public int getScrollbarSize() {
return scrollBarSize;
}
}
|