TristateButtonModel is not firing a ChangeEvent when state is changed from STATE_MIXED to STATE_SELECTED.
Specifically, isSelected returns true when the state is STATE_MIXED and isSelected returns false when state is SATE_UNSELECTED. A ChangeEvent should have been fired when isSelected changed from true to false.
Running TristateButtonModelBug.java we get the following output. Notice it doesn't not print out a change event when state changes from STATE_MIXED to STATE_UNSELECTED.
setState STATE_MIXED
javax.swing.event.ChangeEvent[source=com.jidesoft.swing.TristateButtonModel@1fb3ebeb]
after setState, selected = true
setState STATE_UNSELECTED
selected = false
after setState, selected = false
We expect the following output.
setState STATE_MIXED
javax.swing.event.ChangeEvent[source=com.jidesoft.swing.TristateButtonModel@1fb3ebeb]
after setState, selected = true
setState STATE_UNSELECTED
javax.swing.event.ChangeEvent[source=com.jidesoft.swing.TristateButtonModel@1fb3ebeb]
selected = false
after setState, selected = false
This doesn't seem to cause massive issue in the look and feels provided by the JDK, but RadianceCheckBoxUI is using its own somewhat dynamic icon to render the checkbox and that icon will only change change it's rendering based on the receiving the state change event.
I know Radiance is probably not one of the supported Look and Feel's, but in this case Radiance could be fixed to work correctly if TristateButtonModel correctly fired an event when state changes from STATE_MIXED to STATE_UNSELECTED.
Run TristateCheckBoxBug.java and click the "Mixed" radio button followed by the "Unselected" radio button to see the issue.
