vranasaurus, I do not think that there's much question about whether a court order constitutes "state action." That doesn't necessarily mean that it is a "state action of the type prohibited by the 2nd Amendment."
In the case of judicial action to enforce a lease between private parties, that's outside the scope of the 2A. If the tenant signed the lease with a no-firearms clause, then the tenant has surrendered his right to possess firearms on the property, in exchange for the right to occupy the property. This is a perfectly enforceable contractual arrangement. If you violate the lease, you can be evicted. This is the case, regardless of whether: (a) you violate the no-guns clause; (b) you violate the no-dogs-greater-than-100-lbs clause; (c) you violate the noise clauses; or (d) other.
With respect to Heller, the question was not whether a private property owner could ask for such a surrender or exchange, but whether the government could prohibit possession of firearms within the home. In this context, one critical note (to my mind, anyway) is that the DC ordinances prohibited the owner of the property from possessing functional firearms in his or her own home. This is an entirely different situation from the landlord/tenant situation.
I'm a lawyer, but I'm not your lawyer. If you need some honest-to-goodness legal advice, go buy some.