/* $Id: SearchToolBar.java 742 2013-09-09 05:09:41Z minao $ */
package smart_gs.swingui.toolbar;

import java.awt.Image;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JToolBar;

import smart_gs.GSConstants;
import smart_gs.smleditor.swingui.GSEditorFrame;
import smart_gs.swingui.toolbar.action.SearchActionListener;
import smart_gs.swingui.toolbar.action.Text2ImageActionListener;
@SuppressWarnings("serial")
public class SearchToolBar extends JToolBar{
	
	public SearchToolBar(GSEditorFrame parent){
		
		ImageIcon searchIcon = new ImageIcon(GSConstants.ICON_PATH+"search2.png");
		ImageIcon smallIcon = 
			new ImageIcon(searchIcon.getImage()
					.getScaledInstance((int) (searchIcon.getIconWidth() * 0.75), -1,
							Image.SCALE_SMOOTH));

		JButton search = new JButton(smallIcon);
		search.addActionListener(new SearchActionListener(parent));
		search.setToolTipText("Open Search Dialog");
		this.add(search);
		
		JButton text2Image = new JButton("Text-Image");
		text2Image.addActionListener(new Text2ImageActionListener());
//		this.add(text2Image);
	}
}
