Make ColorPane.clear method thread safe