-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
I have observed an infinite repaint loop in my app due to the code in AquaTableUI that (according to commit history) is related to drag and drop:
if (!AquaColors.isPriority(table.getSelectionBackground())) {
table.setSelectionBackground(null);
}and
if (!AquaColors.isPriority(table.getSelectionBackground())) {
Color c = AquaColors.CLEAR;
if (isDropTarget) {
c = colors.getBackground(appearanceContext.withState(ACTIVE_DEFAULT).withSelected(true));
} else if (isSelected) {
if (appearanceContext.getState() == ACTIVE_DEFAULT && isSelectionMuted) {
c = colors.getBackground(appearanceContext.withState(ACTIVE).withSelected(true));
} else {
c = colors.getBackground(appearanceContext.withSelected(true));
}
}
table.setSelectionBackground(c);
}This is because JTable.setSelectionBackground calls repaint(), and VAqua calls table.setSelectionBackground on every render.
I haven't found a good workaround for this yet. Perhaps we only need to change the selected background under some circumstances (in getRendererComponent), and we could only then undo it when necessary (in paintRenderedCell)?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels