Because a FileTree loads child-trees dynamically in background thread you have to give it some time and reapply the opennessState a few times, so that the restoring can be applied to child-trees.
Here is one solution, maybe there are some more elegant solutions at this forum