package workerthreads;

import gui.MainFrameController;

import javax.swing.SwingWorker;

/**
 * This is only a template class...
 * 
 * @author Martin Pabst, 2009
 * 
 */
public class Beispielworker extends SwingWorker<Void, String> {

	/**
	 * store controller object
	 */
	private MainFrameController controller;

	/**
	 * constructor, only stores controller
	 * 
	 * @param controller
	 */
	public Beispielworker(MainFrameController controller) {
		super();
		this.controller = controller;

	}

	@Override
	protected Void doInBackground() throws Exception {
		controller.setButtonsEnabled(false);
		controller.setWaitCursor(true);
		controller.enableProgressbar(true);
		controller.setProgressBarMaximum(-1);

		controller.setWaitCursor(false);
		controller.setButtonsEnabled(true);
		controller.enableProgressbar(false);

		return null;
	}

}
