(int x, int y)
| 381 | |
| 382 | |
| 383 | private int findSelection(int x, int y) { |
| 384 | // if app loads slowly and cursor is near the buttons |
| 385 | // when it comes up, the app may not have time to load |
| 386 | if ((x1 == null) || (x2 == null)) return -1; |
| 387 | |
| 388 | for (int i = 0; i < buttonCount; i++) { |
| 389 | if ((y > y1) && (x > x1[i]) && |
| 390 | (y < y2) && (x < x2[i])) { |
| 391 | //System.out.println("sel is " + i); |
| 392 | return i; |
| 393 | } |
| 394 | } |
| 395 | return -1; |
| 396 | } |
| 397 | |
| 398 | |
| 399 | private void setState(int slot, int newState, boolean updateAfter) { |
no outgoing calls
no test coverage detected