[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: more JTable fixes
From: |
Roman Kennke |
Subject: |
[cp-patches] FYI: more JTable fixes |
Date: |
Mon, 12 Sep 2005 21:13:06 +0200 (CEST) |
User-agent: |
SquirrelMail/1.4.4 |
Hi,
I fixed two little problems that I had with JTable:
1. The table headers were not initialized correctly. That was introduced
by myself earlier this day. The table header values have to be initialized
in JTable.createDefaultColumnsFromMode().
2. The table columns were a little bit misaligned. I have spotted an empty
space of 1 pixel between each table header cell and the table grid was
also painted with an offset of 1 pixel. This was caused by a wrong
assumption in the calculation of the table cell rectangles. The method
TableColumnModel.getWidth() is supposed to return the column width
_including_ the gap between the cells. The calculations have added one
more pixel per column. This had the effect that with large tables the
offsets could sum up to a significant increase in table width.
All in all the JTable should look a little better now :-)
2005-09-12 Roman Kennke <address@hidden>
* javax/swing/JTable.java
(getCellRect): Don't include cell gap in cell rectangle
calculation. It's already included in TableColumnModel.getWidth().
(createDefaultColumnsFromModel): Initialize table header values.
* javax/swing/plaf/basic/BasicTableUI.java
(paint): Don't include cell gap in cell rectangle
calculation. It's already included in TableColumnModel.getWidth().
/Roman
Table.diff
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: more JTable fixes,
Roman Kennke <=