Inversion of transparency

Is there an easy way to invert the transparency of a layer - that is, lock the content so that only the transparent areas can be painted? This seems much more useful to me than the preserve transparency function.