/* $Id: SearchMenu.java 1064 2016-01-24 16:02:47Z shayashi $ */
package smart_gs.menu;

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

import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.KeyStroke;

import smart_gs.dictionary.DictionaryDialog;
import smart_gs.swingui.AbstractGSWindow;
import smart_gs.swingui.WorkspaceWindow;
import smart_gs.swingui.toolbar.action.CurrentTextSearchActionListener;
import smart_gs.swingui.toolbar.action.SearchActionListener;
import smart_gs.swingui.toolbar.action.Text2ImageActionListener;

public class SearchMenu extends JMenu {
	
	public SearchMenu(String title, AbstractGSWindow parent){
		super(title);
		
		JMenuItem Search = new JMenuItem("Global Text Search");
		this.add(Search);
		Search.addActionListener(new SearchActionListener(parent,0));
		
		JMenuItem Search2 = new JMenuItem("Image Search");
		this.add(Search2);
		Search2.addActionListener(new SearchActionListener(parent,1));
		
//		JMenuItem text2Image = new JMenuItem("Text-Image");
//		text2Image.addActionListener(new Text2ImageActionListener());
////		this.add(text2Image);
//	
//		JMenuItem ctextSearch = new JMenuItem("Text Search");
//		ctextSearch.setAccelerator(KeyStroke.getKeyStroke("ctrl T"));
//		ctextSearch.addActionListener(new CurrentTextSearchActionListener());
//		this.add(ctextSearch);

		JMenuItem makeSeachlist = new JMenuItem("Spread Selection List");
		makeSeachlist.addActionListener(new SpreadSelectionListListener());
		this.add(makeSeachlist);
	
	}

}
