MCPcopy Index your code
hub / github.com/arduino/Arduino / handleMouse

Method handleMouse

app/src/processing/app/EditorToolbar.java:359–380  ·  view source on GitHub ↗
(MouseEvent e)

Source from the content-addressed store, hash-verified

357
358
359 private void handleMouse(MouseEvent e) {
360 int x = e.getX();
361 int y = e.getY();
362
363 if (currentRollover != -1) {
364 if ((x > x1[currentRollover]) && (y > y1) &&
365 (x < x2[currentRollover]) && (y < y2)) {
366 return;
367
368 } else {
369 setState(currentRollover, INACTIVE, true);
370 currentRollover = -1;
371 }
372 }
373 int sel = findSelection(x, y);
374 if (sel == -1) return;
375
376 if (state[sel] != ACTIVE) {
377 setState(sel, ROLLOVER, true);
378 currentRollover = sel;
379 }
380 }
381
382
383 private int findSelection(int x, int y) {

Callers 3

mouseMovedMethod · 0.95
mouseEnteredMethod · 0.95
mouseExitedMethod · 0.95

Calls 2

setStateMethod · 0.95
findSelectionMethod · 0.95

Tested by

no test coverage detected