@Override
	public void close() {
		if (origCancelEnabled != null) {
			super.setCancelEnabled(origCancelEnabled);
		}
		if (origIndeterminate != null) {
			super.setIndeterminate(origIndeterminate);
		}
		if (origShowProgress != null) {
			super.setShowProgressValue(origShowProgress);
		}
		if (origMessage != null) {
			super.setMessage(origMessage);
		}
		if (origMax != null) {
			super.setMaximum(origMax);
		}
		if (origProgress != null) {
			super.setProgress(origProgress);
		}
	}
A {@link TaskMonitor} wrapper that restores all changed values of the wrapped TaskMonitor when
the wrapper is {@link #close() closed}.
Ghidra/Framework/Generic/src/main/java/ghidra/util/task/PreserveStateWrappingTaskMonitor.java