MCPcopy Create free account
hub / github.com/HumbleUI/JWM / Example

Method Example

examples/empty/java/Example.java:14–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12 public Window window;
13
14 public Example() {
15 window = App.makeWindow();
16 window.setEventListener(this);
17 window.setTitle("Empty");
18 window.setLayer(new LayerGLSkija());
19
20 var screen = App.getPrimaryScreen();
21 var scale = screen.getScale();
22 var bounds = screen.getWorkArea();
23
24 window.setWindowSize((int) (300 * scale), (int) (600 * scale));
25 window.setWindowPosition((int) (300 * scale), (int) (200 * scale));
26 window.setVisible(true);
27 }
28
29 public void paint(Canvas canvas, int width, int height) {
30 float scale = window.getScreen().getScale();

Callers

nothing calls this directly

Calls 9

makeWindowMethod · 0.95
getPrimaryScreenMethod · 0.95
setEventListenerMethod · 0.80
setTitleMethod · 0.45
setLayerMethod · 0.45
getScaleMethod · 0.45
setWindowSizeMethod · 0.45
setWindowPositionMethod · 0.45
setVisibleMethod · 0.45

Tested by

no test coverage detected