JBackupWithZip is written entirely in Java 1.4 / Swing.
The graphical selection of folders and files uses the Swing JTree class.
Save-restore of the selection uses an XML file.
Task progression shown during zipping is allowed with the uses a independent thread for the zip task and with listener mechanism of the process running.
The class modeling uses intensively the visitor pattern (see Bruce Eckel's Thinking in Patterns book).
The tree nodes are the folders and files. They are visited for :
JBackupWithZip was an opportunity to build base classes in java to control and view a process while it is running.
The process is controled : start, cancel...
The process is viewed : follow the progression and what it is doing at any moment.
This include :
All these classes have been built with base classes that are general classes for any process to control and view.
The specific classes for the zipping process in JBackupWithZip have been inherited from the library class.
Then, you can reuse these general classes if they fit to your needs. See the last screenshots, called "Running the zip task : details about estimation and cancel"