The 72 COLREGS do not give sailboats any "any right of way". The term "right of way", and thinking that goes along with this language is just plain dangerous and I have seen it get many unprepared and less knowledgeable sailors into big trouble. How many times have we all heard this?? "I had right of way over that idiot! I'm a sail boat god damn it"...
You were the stand on vessel but calling the term "right of way" is a little dangerous and tends to denote set in stone privileges.
There is only one certain situation in the 72 COLREGS, rule #9, where the term "right of way" is used and it does not apply in your situation.
The proper terminology is "Stand on vessel" and "Give way vessel". The ultimate goal of the COLREGS is to prevent collision and the COLREGS lay out certain criteria to follow under circumstances such as the one you experienced. When it becomes clear that you are a stand on vessel but the other guy does not know the rules of the road you need to make your intentions known as early as possible as you did.
Also bear in mind that the vast majority of boaters DO NOT know the COLREGS. You did the right thing by stating your intentions early thus avoiding a collision. If the J-24 had a clue he would have given way early and let you be the stand on vessel, as he should have, spinnaker or not..
Here is specific wording from the USCG regarding the Stand On and Give Way vessels:
"The International Navigation Rules do not confer upon any vessel the right of way however, certain vessels in sight of each other are responsible to keep out of the way of others. Usually, power-driven vessels are to keep out of the way of a vessel not under command or restricted in her ability to maneuver, sailing vessels or a vessel engaged in fishing. However, some exceptions exist when they themselves are not in command or restricted in her ability to maneuver (Rule 18), overtaking another vessel (Rule 13), are navigating a narrow channel or fairway (Rule 9), and other less explicit circumstances. Navigation Rules should be regarded as a code of conduct and not a bill of rights. They do not bestow rights or privileges, but impose the duty to either give-way or stand-on, dependent on the circumstances. What is important is not so much what things are, i.e. sailing vessel, operational, etc., but how to avoid collisions, e.g. although under sail yet able to be propelled by machinery, obtaining an early warning by radar, etc. Understand, the Rules are in place to prevent collisions not to define nautical terms or to be subjected to strict interpretation."