Make new native platform-specific window. Note: must be called only after or inside #start(Runnable) successful method call. @return new window instance
()
| 43 | * @return new window instance |
| 44 | */ |
| 45 | @NotNull @SneakyThrows |
| 46 | public static Window makeWindow() { |
| 47 | assert _onUIThread() : "Should be run on UI thread"; |
| 48 | Window window; |
| 49 | if (Platform.CURRENT == Platform.WINDOWS) |
| 50 | window = new WindowWin32(); |
| 51 | else if (Platform.CURRENT == Platform.MACOS) |
| 52 | window = new WindowMac(); |
| 53 | else if (Platform.CURRENT == Platform.X11) |
| 54 | window = new WindowX11(); |
| 55 | else |
| 56 | throw new RuntimeException("Unsupported platform: " + Platform.CURRENT); |
| 57 | _windows.add(window); |
| 58 | return window; |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * <p>Request application terminate.</p> |
no test coverage detected