[SWINGX-1421] AbstractActionExt should use Action.SELECTED_KEY underneath is/setSelected Created: 22/Mar/11  Updated: 02/Dec/11  Resolved: 02/Dec/11

Status: Resolved
Project: swingx
Component/s: Action
Affects Version/s: 1.6.2
Fix Version/s: 1.6.3

Type: Bug Priority: Major
Reporter: Karl Schaefer Assignee: Karl Schaefer
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

As of Java 1.6, Action now supports a selected state. We need to defer to that to ensure that our action will work correctly with core components.



 Comments   
Comment by Karl Schaefer [ 02/May/11 ]

Issue 1364 and Issue 1421: Updated AbstractActionExt to use the Action.SELECTED_KEY instead of managing the selection manually. The key is used by buttons to correctly autoconfigure as of 1.6. Began work on changing the type constraints for action command to String. Must finish that in the next release when we can change getActionCommand to String.

swingx-action/src/main/java/org/jdesktop/swingx/action/AbstractActionExt.java
swingx-action/src/test/java/org/jdesktop/swingx/action/AbstractActionExtTest.java
swingx-action/src/test/java/org/jdesktop/swingx/action/ActionIssues.java
swingx-action/src/test/java/org/jdesktop/swingx/action/ActionTest.java

Committed revision 3999.

Comment by kleopatra [ 03/May/11 ]

careful: this change will heavily break all existing apps which listen to the "selected"! Need a more open and at the same time smoother transition than a hidden re-wire, f.i. keep the old notification for a while

similar for any other keys that are updated to 1.6 (just saw the large-icon f.i.)

would suggest to re-open this or alternatively create an umbrella issue

Comment by Karl Schaefer [ 03/May/11 ]

Reopen to ensure a smoother transition for clients.

Comment by Karl Schaefer [ 02/Dec/11 ]

SWINGX-1421: Continue to fire selected for the next release. Depracted with warning that selected may stop working in the future.

swingx-action/src/main/java/org/jdesktop/swingx/action/AbstractActionExt.java

Committed revision 4103.

Generated at Sun Jun 26 21:31:19 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.