Issue Details (XML | Word | Printable)

Key: SWINGX-1297
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: kleopatra
Reporter: kleopatra
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
swingx

GTK: NPE when setting border of non-label renderer components (core bug)

Created: 31/Mar/10 07:52 AM   Updated: 28/Jan/11 12:55 PM   Resolved: 05/Nov/10 03:51 AM
Component/s: Renderer
Affects Version/s: 1.6.1
Fix Version/s: 1.6.3

Time Tracking:
Not Specified

Environment:

Operating System: All
Platform: All


Issuezilla Id: 1,297
Tags:
Participants: Karl Schaefer and kleopatra


 Description  « Hide

reported in

http://forums.java.net/jive/thread.jspa?threadID=77690

the core issue is that the GTKPainter$ListTableFocusBorder is a broken implementation
(returns null for insets of non-label components)

SwingX can/should work around with a custom wrapping border (as suggested in the thread)
until core is fixed.



kleopatra added a comment - 05/Nov/10 03:51 AM

cc'ed to reporter of the duplicate (not sure if the tracker handles that notification
automatically)


kleopatra added a comment - 05/Nov/10 03:48 AM

closing (want my desk clear <g>) Simply reopen if there still are problems

Jeanette


kleopatra added a comment - 04/Nov/10 05:20 AM

Karl,

I decided against the hammer Don't want to save the world, just make SwingX renderers
safe enough. Client code accessing the GTK installed unsafe borders before a Table/List
is instantiated are on their own. The core issue looks fixed as of 7-b102 which fixed
the base issue (which is a crappy AbstractBorder implementation)

  • added SafeBorder to package plaf, deprecated the existing in package linux
  • added border replacing code in TableAddon, ListAddon if GTK is detected
  • added tests

@OP, could you please check if this really solves the problem? We are blind on the Linux
eye

committed as of revision #3879 (Hudson's down - so checkout from svn is the only option
to get the latest code, sigh...)

Thanks
Jeanette


kleopatra added a comment - 04/Nov/10 02:31 AM

taking


kleopatra added a comment - 04/Nov/10 02:15 AM

kleopatra added a comment - 01/Nov/10 08:18 AM

not really - locally I have a project which contains the gtk plaf from openjdk, so I can
set the gtk laf, kind of. Not really working, currently just see a table without cells

  • but can blind-click somewhere in a boolean columns and so reproduce the stack trace.

Karl Schaefer added a comment - 01/Nov/10 07:56 AM

Hadn't heard anything more on this. Where are we?

Jeanette, are you able to test GTK? You were doing those Synth updates a bit
ago? I have no way of running this though I can make some coding progress in a
vacuum if you want.


kleopatra added a comment - 01/Nov/10 06:26 AM
      • Issue 1351 has been marked as a duplicate of this issue. ***

kleopatra added a comment - 01/Apr/10 01:17 AM

not on GTK, nevertheless a couple of comments:

  • SafeBorder is not yet used
  • wouldn't install it unconditionally, only if the Border coming from the ui is a GTKPainter&ListTableFocusBorder
    (checking the name is cheap enough)
  • all the potential entries should be checked and replaced (that's the focusSelected,
    focused and noFocus, the exact names are in the thread)
  • they probably come for list and tree as well (Guilaume, could you please check? Karl
    and me are both more or less blind on the GTK eye
  • in the SafeBorder, how about asking super for the insets and only jump in with a label
    if it comes out with a null? Feels less intrusive
  • would prefer the label as a field instead of recreating on each call
  • maybe extend AbstractBorder instead of implementing from scratch? There are places in
    the LAF which are optimized and go through the getBorderInsets(comp, inset) with a not-null
    inset

Happy coding! And testing <g>

CU
Jeanette


Karl Schaefer added a comment - 31/Mar/10 08:55 AM

Awaiting feedback from GTK users.


Karl Schaefer added a comment - 31/Mar/10 08:53 AM

Issue 1297: Added a wrapping border to ensure that Synth does not return null
insets from getBorderInsets.

src/java/org/jdesktop/swingx/plaf/linux/LinuxLookAndFeelAddons.java
src/java/org/jdesktop/swingx/plaf/linux/SafeBorder.java

Committed revision 3637.