- /**
- * Put the cursor at (x,y).
- *
- * @param visible if true, the cursor should be visible
- * @param x column coordinate to put the cursor on
- * @param y row coordinate to put the cursor on
- */
- @Override
- public void putCursor(final boolean visible, final int x, final int y) {
-
- if ((visible == cursorVisible) && ((x == cursorX) && (y == cursorY))) {
- // See if it is time to flip the blink time.
- long nowTime = (new Date()).getTime();
- if (nowTime < blinkMillis + lastBlinkTime) {
- // Nothing has changed, so don't do anything.
- return;
- }
- }
-
- if (cursorVisible
- && (cursorY <= height - 1)
- && (cursorX <= width - 1)
- ) {
- // Make the current cursor position dirty
- if (physical[cursorX][cursorY].getChar() == 'Q') {
- physical[cursorX][cursorY].setChar('X');
- } else {
- physical[cursorX][cursorY].setChar('Q');
- }
- }
-
- super.putCursor(visible, x, y);
- }
-