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

Method accept

examples/dashboard/java/PanelMouse.java:21–42  ·  view source on GitHub ↗
(Event e)

Source from the content-addressed store, hash-verified

19 }
20
21 @Override
22 public void accept(Event e) {
23 if (e instanceof EventMouseMove ee) {
24 lastMouseMove = ee;
25 var inside = contains(ee.getX(), ee.getY());
26 if (inside || lastInside) {
27 lastInside = inside;
28 window.requestFrame();
29 }
30 } else if (e instanceof EventMouseScroll ee) {
31 scroll = scroll.offset(ee.getDeltaX(), ee.getDeltaY());
32 window.requestFrame();
33 } else if (e instanceof EventMouseButton ee) {
34 var button = ee.getButton();
35 if (ee.isPressed() == true) {
36 if (!buttons.contains(button))
37 buttons.add(button);
38 } else
39 buttons.remove(button);
40 window.requestFrame();
41 }
42 }
43
44 @Override
45 public void paintImpl(Canvas canvas, int width, int height, float scale) {

Callers

nothing calls this directly

Calls 2

containsMethod · 0.80
requestFrameMethod · 0.45

Tested by

no test coverage detected