Table: add disabled icon for boolean renderer (issue #1008)

This commit is contained in:
Karl Tauber
2025-06-20 19:56:24 +02:00
parent 4945378dd3
commit 0863e289a1

View File

@@ -39,6 +39,7 @@ import java.beans.PropertyChangeListener;
import java.util.Map;
import javax.swing.Action;
import javax.swing.ActionMap;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JScrollPane;
import javax.swing.JTable;
@@ -989,12 +990,14 @@ public class FlatTableUI
FlatBooleanRenderer() {
setHorizontalAlignment( SwingConstants.CENTER );
setIcon( new FlatCheckBoxIcon() {
Icon icon = new FlatCheckBoxIcon() {
@Override
protected boolean isSelected( Component c ) {
return selected;
}
} );
};
setIcon( icon );
setDisabledIcon( icon );
}
@Override