getWindowClass static method
(en) Returns the appropriate window class based on the specified screen size. However, "EnumWindowClass.any" is not considered here. The return value is selected from other classes.
(ja) EnumWindowClass.anyを除く、画面幅に対して適切なウィンドウクラスを返します。
width
: The screen width.
Implementation
static EnumWindowClass getWindowClass(double width) {
if (width < 600) {
return EnumWindowClass.compact;
} else if (width >= 600 && width < 840) {
return EnumWindowClass.medium;
} else {
return EnumWindowClass.expanded;
}
}