They'd have to be under contract, of course.
Have a look at the Bosh scenario and that'll spell it all out.
Somebody who knows the cap rules inside & out, please answer this for me. I thought teams are granted trade exceptions they can use as pieces in a trade if they end up losing players to another team via free agency (similar to how the Cavs got a $14.5M trade exception when Lebron took his talents to South Beach)? Or does it work differently for UFA's?
Toronto and Cleveland got 'em because Bosh and James ultimately went to Miami on sign and trade deals, in return for some second round picks, so that Miami could offer steeper rises in the following years and still have enough money to sign Haslem that year.