/*
 * Created on 29.03.2004 12:34:46
 *
 * Multimediale Algorithmen und Datenstrukturen Assessments
 */
package mauda.generation;

import mauda.*;
import mauda.treeoperationview.*;

//import java.util.Vector;

/**
 * Extends the Exercise-class to hold specific information that is
 * needed for Generation-Editor.
 * 
 * @author Markus Krebs
 */
public class GenExercise extends Exercise {

	private TreeOperationView treeOperationView;

	/**
	 * Creates a GenExercise
	 * @param type plug-in-name
	 */
	public GenExercise(String type) {
		super(type);

		TreeOperationView.DISPLAY_MODE = TreeOperationView.GENERATION_DISPLAY_MODE;
		treeOperationView = new TreeOperationView(this);
		addExerciseUpdateListener(treeOperationView);
		treeOperationView.noFinishedLoadingMessage();
		treeOperationView.enableJumping();
		treeOperationView.enableStop();
	}

	/**
	 * Gets the <code>TreeOperationView</code>
	 * @return TreeOperationView
	 */
	public TreeOperationView getTreeOperationView() {
		return treeOperationView;
	}
	/*
	public void exerciseUpdate(ExerciseUpdateEvent e) {
		if(e.getID() == ExerciseUpdateEvent.SPECIAL) {
			if(e.getMessage().equals("FULL_LOADED")) {
				// markCorrectness kann leider nicht funktionieren,
				// da die Templates auf der Datenstruktur garnicht
				// ausgeführt wurden
				//treeOperationView.markCorrectness(false, true);
				//jumpToBeginning();
				treeOperationView.enableJumping();
				treeOperationView.enableStop();
				//System.out.println("OperationRecorder:\n"+getOperationRecorder());
			}
		}
	}*/
}
