Dear student,
The given line means that life or rather one's survival is dependent on the art around them and their thoughts rather than the prevailing conditions. Johnsy had left hopes of recovering and getting back to life because she thought that she would die with the fall of the last leaf from the old ivy tree. However, this was not the truth, it was only Johnsy's thought that had kept her away from recovery. When she saw the last leaf standing firm even in heavy storms, she decided to stop thinking that the sun of her life would set with the fall of the leaf. The leaf was actually a piece of art created by Behrman which would never fall and taking inspiration from that painted leaf, Johnsy decided to cooperate with Sue and fight her illness. Thus, it can be said that life follows art and mind over matters. Johnsy never believed that she could recover until the piece of art created by Behrman and her mind gave her the confidence to live.
Regards