< prev index next >

src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java

Print this page

        

*** 1318,1327 **** --- 1318,1333 ---- return; } if (!loc.isInsertRow() && !loc.isInsertColumn()) { Rectangle rect = table.getCellRect(loc.getRow(), loc.getColumn(), false); + if(table.getClientProperty("Table.showWholeRowAsDropTarget") == Boolean.TRUE) { + // used by WindowsFileChooserUI in Details view + + rect.x = 0; + rect.width = table.getWidth(); + } if (rect != null) { table.repaint(rect); } return; }
*** 2050,2059 **** --- 2056,2069 ---- } return -1; } private void paintCells(Graphics g, int rMin, int rMax, int cMin, int cMax) { + boolean cellWidthHack = table.getClientProperty( + "BasicTableUI.cellWidthHack") == Boolean.TRUE; + // used by WindowsFileTableUI to remove borders between cells event when a row is selected + JTableHeader header = table.getTableHeader(); TableColumn draggedColumn = (header == null) ? null : header.getDraggedColumn(); TableColumnModel cm = table.getColumnModel(); int columnMargin = cm.getColumnMargin();
*** 2066,2075 **** --- 2076,2087 ---- cellRect = table.getCellRect(row, cMin, false); for(int column = cMin; column <= cMax; column++) { aColumn = cm.getColumn(column); columnWidth = aColumn.getWidth(); cellRect.width = columnWidth - columnMargin; + if(cellWidthHack) + cellRect.width += 1; if (aColumn != draggedColumn) { paintCell(g, cellRect, row, column); } cellRect.x += columnWidth; }
< prev index next >