| 1351 | |
| 1352 | |
| 1353 | @Override |
| 1354 | public void hideCursor() { |
| 1355 | // Because the OS may have shown the cursor on its own, |
| 1356 | // don't return if 'cursorVisible' is set to true. [rev 0216] |
| 1357 | |
| 1358 | if (invisibleCursor == null) { |
| 1359 | BufferedImage cursorImg = |
| 1360 | new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB); |
| 1361 | // this is a temporary workaround for the CHIP, will be removed |
| 1362 | Dimension cursorSize = Toolkit.getDefaultToolkit().getBestCursorSize(16, 16); |
| 1363 | if (cursorSize.width == 0 || cursorSize.height == 0) { |
| 1364 | invisibleCursor = Cursor.getDefaultCursor(); |
| 1365 | } else { |
| 1366 | invisibleCursor = |
| 1367 | canvas.getToolkit().createCustomCursor(cursorImg, new Point(8, 8), "blank"); |
| 1368 | } |
| 1369 | } |
| 1370 | canvas.setCursor(invisibleCursor); |
| 1371 | cursorVisible = false; |
| 1372 | } |
| 1373 | |
| 1374 | |
| 1375 | @Override |