/** special paint handler for merged cell regions */
  protected void paintSpans(Graphics g, int rowMin, int rowMax, int colMin, int colMax) {
    Rectangle clip = g.getClipBounds();
    Iterator cell = grid.getSpanModel().getSpanIterator();
    while (cell.hasNext()) {
      CellSpan span = (CellSpan) cell.next();
      Rectangle cellBounds = grid.getCellBounds(span.getRow(), span.getColumn());

      // Only paint cell if visible
      if (span.getLastRow() >= rowMin
          && span.getLastColumn() >= colMin
          && span.getFirstRow() <= rowMax
          && span.getFirstColumn() <= colMax) {
        paintCell(g, cellBounds, span.getRow(), span.getColumn());
        // Paint grid line around cell
        if (grid.getShowGrid()) {
          g.setColor(grid.getGridColor());
          g.drawRect(cellBounds.x, cellBounds.y, cellBounds.width, cellBounds.height);
        }
      }
    }
  }