diff options
author | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-17 18:09:40 +0000 |
---|---|---|
committer | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-17 18:09:40 +0000 |
commit | 2d8cf20d0d5ca6b1fbdefc22229d4b7cf1497ede (patch) | |
tree | c976ca91e3ef0bda3b34b37c0195145638d8d08e /libjava/classpath/javax/swing/plaf/basic/BasicTableUI.java | |
parent | a3ef37ddfeddcc5b0f1c5068d8fdeb25a302d5cd (diff) | |
download | ppe42-gcc-2d8cf20d0d5ca6b1fbdefc22229d4b7cf1497ede.tar.gz ppe42-gcc-2d8cf20d0d5ca6b1fbdefc22229d4b7cf1497ede.zip |
Imported GNU Classpath 0.20
* Makefile.am (AM_CPPFLAGS): Add classpath/include.
* java/nio/charset/spi/CharsetProvider.java: New override file.
* java/security/Security.java: Likewise.
* sources.am: Regenerated.
* Makefile.in: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109831 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/javax/swing/plaf/basic/BasicTableUI.java')
-rw-r--r-- | libjava/classpath/javax/swing/plaf/basic/BasicTableUI.java | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicTableUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicTableUI.java index 015443946d7..18b69120d11 100644 --- a/libjava/classpath/javax/swing/plaf/basic/BasicTableUI.java +++ b/libjava/classpath/javax/swing/plaf/basic/BasicTableUI.java @@ -1193,29 +1193,9 @@ public class BasicTableUI extends TableUI TableCellRenderer rend, TableModel data, int rowLead, int colLead) { - boolean rowSelAllowed = table.getRowSelectionAllowed(); - boolean colSelAllowed = table.getColumnSelectionAllowed(); - boolean isSel = false; - if (rowSelAllowed && colSelAllowed || !rowSelAllowed && !colSelAllowed) - isSel = table.isCellSelected(row, col); - else - isSel = table.isRowSelected(row) && table.getRowSelectionAllowed() - || table.isColumnSelected(col) && table.getColumnSelectionAllowed(); - - // Determine the focused cell. The focused cell is the cell at the - // leadSelectionIndices of the row and column selection model. - ListSelectionModel rowSel = table.getSelectionModel(); - ListSelectionModel colSel = table.getColumnModel().getSelectionModel(); - boolean hasFocus = table.hasFocus() && table.isEnabled() - && rowSel.getLeadSelectionIndex() == row - && colSel.getLeadSelectionIndex() == col; - - Component comp = rend.getTableCellRendererComponent(table, - data.getValueAt(row, col), - isSel, hasFocus, row, col); - + Component comp = table.prepareRenderer(rend, row, col); rendererPane.paintComponent(g, comp, table, bounds); - + // FIXME: this is manual painting of the Caret, why doesn't the // JTextField take care of this itself? if (comp instanceof JTextField) @@ -1263,7 +1243,7 @@ public class BasicTableUI extends TableUI width - gap.width + 1, height - gap.height); if (bounds.intersects(clip)) - { + { paintCell(gfx, r, c, bounds, table.getCellRenderer(r, c), table.getModel(), table.getSelectionModel().getLeadSelectionIndex(), @@ -1286,12 +1266,10 @@ public class BasicTableUI extends TableUI x = x0; Color save = gfx.getColor(); gfx.setColor(grid); - boolean paintedLine = false; for (int c = 0; c < ncols && x < xmax; ++c) { x += cols.getColumn(c).getWidth(); gfx.drawLine(x, y0, x, ymax); - paintedLine = true; } gfx.setColor(save); } @@ -1302,12 +1280,10 @@ public class BasicTableUI extends TableUI y = y0; Color save = gfx.getColor(); gfx.setColor(grid); - boolean paintedLine = false; for (int r = 0; r < nrows && y < ymax; ++r) { y += height; gfx.drawLine(x0, y, xmax, y); - paintedLine = true; } gfx.setColor(save); } |