Skip to main content

TableCellEditor with Highlighter

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2006-08-23

Hi all,
in our project we're using very intensively the JXTable of swingx 1.6.2 (and a lot of other components from swingx) and it is a great framework.
My problem now is, if a user edit one line in a jxtable, all fields of the editing line, which are mandatory (not every column is mandatory, only a view), should be marked with a blue border. I've implemented a Highlighter with appropiate HighlighterPredicates for marking these cells. This works pretty well for tableCell Renders. But the actual editing cell has no border, because it is a editor and no renderer. We need Cell Editors for all data type (Strings, Numbers, DatePicker, Boolean, Combos, Colors, Time, Special Editors with Buttons,...)
What is the best way to implement TableCellEditors with the Highlighter feature of swingx ?
thanx for any suggestions

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-06-11

oops ... seem to have lost my watch on this forum, sorry for the delay.
Highlighting editors is not supported (yet? - if you feel it should, please file a feature issue in the SwingX issue tracker, assuming it's still working in all this migration dust ;) - but as far as I can see, there's nothing that prevents a highlighter to decorate an editing component the same way it does with a rendering component. The place to tweak is the JXTable's prepareEditor: override and add the same lines as in prepareRenderer.
Please let us know how it goes - especially, what's missing to make it work (suspect that the ComponentAdapter needs a property "editing")