It seems like all this code should be in refreshProperties() and/or refreshRendering().   I don't see a reason for having a third function for updating the ProgressBar.   Did I miss something?