FileDocCategorySizeDatePackage
AutoSave.javaAPI DocExample657Sun Dec 27 15:20:28 GMT 1998None

AutoSave

public class AutoSave extends Thread

Fields Summary
FileSaver
model
Constructors Summary
public AutoSave(FileSaver m)

		super("AutoSave Thread");
		setDaemon(true);		// so we don't keep the main app alive
		model = m;
	
Methods Summary
public voidrun()

		while (true) {		// entire run method runs forever.
			try {
				sleep(30*1000);
			} catch (InterruptedException e) {
				// do nothing with it
			}
			if (model.wantAutoSave() && model.hasUnsavedChanges())
				model.saveFile(null);
		}