コード例 #1
0
 protected void paintEditor(Graphics g) {
   Component component = grid.getEditorComponent();
   if (component == null) {
     return;
   }
   Rectangle cellBounds = grid.getCellBounds(grid.getEditingRow(), grid.getEditingColumn());
   component.setBounds(cellBounds);
   component.validate();
   component.requestFocus();
 }
コード例 #2
0
 /** Paint cell at (row, column) */
 protected void paintCell(Graphics g, Rectangle cellBounds, int row, int column) {
   if (grid.getEditingRow() == row && grid.getEditingColumn() == column) {
     return;
   }
   GridCellRenderer renderer = grid.getCellRenderer(row, column);
   Component rendererComp = grid.prepareRenderer(renderer, row, column);
   CellSpan span = grid.getSpanModel().getSpanOver(row, column);
   rendererPane.paintComponent(
       g,
       rendererComp,
       grid,
       cellBounds.x,
       cellBounds.y,
       cellBounds.width,
       cellBounds.height,
       true);
 }