/*
 * Created on 25.03.2004 20:40:50
 *
 * Multimediale Algorithmen und Datenstrukturen Assessments
 */
package mauda.feedback.select;

import java.util.Vector;
import mauda.Difficulties;
/**
 * Selector for chosing a specific difficulty
 * 
 * @author Markus Krebs
 */
public class DifficultySelector extends Selector {

	Vector diffID;
	/**
	 * Creates a Difficulty-Selector
	 */
	public DifficultySelector() {
		super();

		diffID = new Vector();

		Vector v = new Vector();
		diffID.add(new Integer(Difficulties.EASY));
		v.add(Difficulties.getGUIString(Difficulties.EASY));
		diffID.add(new Integer(Difficulties.MEDIUM));
		v.add(Difficulties.getGUIString(Difficulties.MEDIUM));
		diffID.add(new Integer(Difficulties.HARD));
		v.add(Difficulties.getGUIString(Difficulties.HARD));
			
		setTitle("Difficulty:");
		createView(v);
	}
	/**
	 * Gets the selected difficulty
	 * @return difficulty-ID
	 * @see mauda.Difficulties
	 */
	public int getDifficulty() {
		int a = getSelectedIndex();
		return ((Integer)diffID.elementAt(a)).intValue();
	}

}
