/* $Id: ChangeSearchTypeAction.java 125 2011-03-09 09:49:51Z ohura $ */
package smart_gs.menu.action;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import smart_gs.image_search.GSSearchEngine;

import jp.ac.hokudai.meme.core_smart_gs.searcher.IDocumentSearcher;

public class ChangeSearchTypeAction implements ActionListener {
	
	private int type;
	public ChangeSearchTypeAction(int type) {
		this.type = type;
		if(this.type != IDocumentSearcher.TYPE_DTW_2 && this.type != IDocumentSearcher.TYPE_NORMAL && this.type != IDocumentSearcher.TYPE_DTW_1){
			this.type = IDocumentSearcher.TYPE_NORMAL;
		}
		
		
	}

	public void actionPerformed(ActionEvent e) {
		GSSearchEngine.getInstance().setSearchType(this.type);
	}

}
