@emilian: this is what Kin-Hong found:
Somehow the raised border in Jide's SortTableHeaderRenderer is causing this paint problem in Java 7. So the fix is to use an empty border instead, similar to the one we used in ResultSetTableCustomizer.
However, since we use the SortTableHeaderRenderer in many places, can you try to identify the root issue. This only occurs on Mac OS X using Java 1.7 (the one we bundle w/ ADS v15).
You can see issue #10014 which shows the problem occurring in the Git Client as well
@emilian: this is what Kin-Hong found:
Somehow the raised border in Jide's SortTableHeaderRenderer is causing this paint problem in Java 7. So the fix is to use an empty border instead, similar to the one we used in ResultSetTableCustomizer.
However, since we use the SortTableHeaderRenderer in many places, can you try to identify the root issue. This only occurs on Mac OS X using Java 1.7 (the one we bundle w/ ADS v15).
You can see issue #10014 which shows the problem occurring in the Git Client as well
assigning back to sachin as the jide api needs to be fixed
assigning back to sachin as the jide api needs to be fixed
The border is com.apple.laf.AquaTableHeaderBorder which has some dubious code.
First, it calls JComponent.paint on the target component by itself which is not allowed — the border should paint only within the insets (and it’s called by the component not vice versa). It seems they are simulating a sort of layered pane.
Second, it calls Graphics.clipRect and .translate although this is discouraged by JComponent.paintBorder:
If you override this in a subclass you should not make permanent changes to the passed in Graphics. For example, you should not alter the clip Rectangle or modify the transform. If you need to do these operations you may find it easier to create a new Graphics from the passed in Graphics and manipulate it.
I’m not certain why this only happens with Java 7 but I suspect they are being more aggressive with the optimizations and buffers reuse in the graphics infrastructure which makes all kinds of artifacts visible due to incorrect code.
This could be worked arround by JIDE with some checks in SortTableHeaderRenderer.
You don’t even need to replace the border altogether, you could force AquaTableHeaderBorder to paint properly by just wrapping it and controlling the arguments.
The border is com.apple.laf.AquaTableHeaderBorder which has some dubious code.
First, it calls JComponent.paint on the target component by itself which is not allowed — the border should paint only within the insets (and it’s called by the component not vice versa). It seems they are simulating a sort of layered pane.
Second, it calls Graphics.clipRect and .translate although this is discouraged by JComponent.paintBorder:
If you override this in a subclass you should not make permanent changes to the passed in Graphics. For example, you should not alter the clip Rectangle or modify the transform. If you need to do these operations you may find it easier to create a new Graphics from the passed in Graphics and manipulate it.
I’m not certain why this only happens with Java 7 but I suspect they are being more aggressive with the optimizations and buffers reuse in the graphics infrastructure which makes all kinds of artifacts visible due to incorrect code.
This could be worked arround by JIDE with some checks in SortTableHeaderRenderer.
You don’t even need to replace the border altogether, you could force AquaTableHeaderBorder to paint properly by just wrapping it and controlling the arguments.
BTW, we could control this from our side too via UIDefaults (or CUIDefaultsCustomizer) with something like:
if (AQSystemUtils.isOSX()) { //avoid AquaTableHeaderBorder UIManager.getDefaults().put("TableHeader.cellBorder", BorderFactory.createEmptyBorder()); }
BTW, we could control this from our side too via UIDefaults (or CUIDefaultsCustomizer) with something like:
if (AQSystemUtils.isOSX()) { //avoid AquaTableHeaderBorder UIManager.getDefaults().put("TableHeader.cellBorder", BorderFactory.createEmptyBorder()); }
The updated AquaTableHeaderBorderWrapper seems to please #12321 too.
The updated AquaTableHeaderBorderWrapper seems to please #12321 too.
Verified in ADS-18.0.0-RC-7 on both environment [Windows and OSx] .Refer updates screenshot 'Updated_11917.png'
Verified in ADS-18.0.0-RC-7 on both environment [Windows and OSx] .Refer updates screenshot 'Updated_11917.png'
Issue #11917 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build ADS 18.0.0-devi-110 |
No time estimate |
2 issue links |
is a duplicate of #11949
Issue #11949Alter User - Object Permissions, general tab row numbers are garbled |
depends upon #12321
Issue #12321Alter table GUI - missing headers in the table columns list |