processing/processing — pull request #2370 by joelmoniz (2014-02-19 13:31:46+00:00)
Title: Progress Bar when Saving As ( Issue #70)

Save As now displays a progress bar indicating to the user what percent of his/her Save As has been completed (suggested in [#70](https://github.com/processing/processing/issues/70)).
The percent displayed is with respect to the total size of all the files, which gives a more accurate estimate (as opposed to an estimate based on the number of files).

The following is what I did:

* Added an inner class ProgressBarGUI into the class Sketch to conveniently handle everything related to the Progress Bar
* Created a new event dispatch thread in Sketch.SaveAs(), within which I created an object of class ProgressBarGUI
* Drew the progress bar from within the ProgressBarGUI constructor.
* Started a background thread where all the file copying takes place,
* Overloaded the Base.copyDir() and Base.copyFile() methods so that no errors are created in places which use the original methods. The new (overloaded) set of methods have added 3 parameters, which are used to ensure that the progress bar updates even when files are in a directory (such as the data folder), or when there is a large file, and does not stagnate until the entire directory/file has been copied. The progress bar has been set to update once every 50MB of a large file is done copying.