Table: fixed repainting of rounded selection when selection changes

This commit is contained in:
Karl Tauber
2024-06-27 23:48:14 +02:00
parent 9e05384513
commit 127dd6ac41
2 changed files with 116 additions and 2 deletions

View File

@@ -132,6 +132,14 @@ public class FlatComponents2Test
initTableEditors( table1 );
initTableEditors( xTable1 );
// table selection listeners
table1.getSelectionModel().addListSelectionListener( e -> {
System.out.printf( "row sel %d-%d adj=%b\n", e.getFirstIndex(), e.getLastIndex(), e.getValueIsAdjusting() );
} );
table1.getColumnModel().getSelectionModel().addListSelectionListener( e -> {
System.out.printf( "column sel %d-%d adj=%b\n", e.getFirstIndex(), e.getLastIndex(), e.getValueIsAdjusting() );
} );
// JXTable
Highlighter simpleStriping = HighlighterFactory.createSimpleStriping();
PatternPredicate patternPredicate = new PatternPredicate( "^J", 2 );