Your syntax isn't exactly
Java -- for example using <> for !=, but anyway, you are first doing a case analysis on the source of the action event, then you want to do a case analysis on the current icon for the source? If that state isn't held elsewhere in a cleaner form you can always do this:
By the way, it also may be cleaner to have separate listeners for each button.