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

Method accept

examples/dashboard/java/PanelTouch.java:22–39  ·  view source on GitHub ↗
(Event e)

Source from the content-addressed store, hash-verified

20 }
21
22 @Override
23 public void accept(Event e) {
24 if (e instanceof EventTouchStart ee) {
25 touchDevices.put(ee.getDeviceId(), ee.getId());
26 devices.put(ee.getDeviceId(), new Point(ee.getDeviceWidth(), ee.getDeviceHeight()));
27 touches.put(ee.getId(), new Point(ee.getFracX(), ee.getFracY()));
28 window.requestFrame();
29 } else if (e instanceof EventTouchMove ee) {
30 touches.put(ee.getId(), new Point(ee.getFracX(), ee.getFracY()));
31 window.requestFrame();
32 } else if (e instanceof EventTouchCancel ee) {
33 touches.remove(ee.getId());
34 window.requestFrame();
35 } else if (e instanceof EventTouchEnd ee) {
36 touches.remove(ee.getId());
37 window.requestFrame();
38 }
39 }
40
41 @Override
42 public void paintImpl(Canvas canvas, int width, int height, float scale) {

Callers

nothing calls this directly

Calls 1

requestFrameMethod · 0.45

Tested by

no test coverage detected