/**
* Use an outlined block for the cursor.
*/
- OUTLINE
+ OUTLINE,
+
+ /**
+ * Use a vertical bar for the cursor.
+ */
+ VERTICAL_BAR,
}
// ------------------------------------------------------------------------
cursorStyle = CursorStyle.OUTLINE;
} else if (cursorStyleString.equals("block")) {
cursorStyle = CursorStyle.BLOCK;
+ } else if (cursorStyleString.equals("verticalbar")) {
+ cursorStyle = CursorStyle.VERTICAL_BAR;
}
// Pull the system property for triple buffering.
/*
System.err.println("drawGlyph(): " + xPixel + " " + yPixel +
" " + cell);
- */
+ */
BufferedImage image = null;
if (cell.isBlink() && !cursorBlinkVisible) {
case OUTLINE:
gr.drawRect(xPixel, yPixel, cursorWidth - 1, textHeight - 1);
break;
+ case VERTICAL_BAR:
+ gr.fillRect(xPixel, yPixel, 2, textHeight);
+ break;
}
}
}
if (bounds != null) {
// Only update what is in the bounds
xCellMin = textColumn(bounds.x);
- xCellMax = textColumn(bounds.x + bounds.width);
+ xCellMax = textColumn(bounds.x + bounds.width) + 1;
if (xCellMax > width) {
xCellMax = width;
}
xCellMin = 0;
}
yCellMin = textRow(bounds.y);
- yCellMax = textRow(bounds.y + bounds.height);
+ yCellMax = textRow(bounds.y + bounds.height) + 1;
if (yCellMax > height) {
yCellMax = height;
}
/*
System.err.printf("bounds %s X %d %d Y %d %d\n",
bounds, xCellMin, xCellMax, yCellMin, yCellMax);
- */
+ */
for (int y = yCellMin; y < yCellMax; y++) {
for (int x = xCellMin; x < xCellMax; x++) {