/* $Id: DefaultToolBar.java 716 2013-07-22 04:19:49Z minao $ */
package smart_gs.swingui.toolbar;

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

import smart_gs.GSConstants;
import smart_gs.swingui.toolbar.action.OpenActionListener;
import smart_gs.swingui.toolbar.action.SaveActionListener;

@SuppressWarnings("serial")
public class DefaultToolBar extends JToolBar{
	
	
	public DefaultToolBar(){
		JButton open = new JButton(new ImageIcon(GSConstants.ICON_PATH+"open.gif"));
		open.addActionListener(new OpenActionListener(0));
		open.setToolTipText("Open GS File");
		JButton save = new JButton(new ImageIcon(GSConstants.ICON_PATH+"save.gif"));
		save.addActionListener(new SaveActionListener(0));
		save.setToolTipText("Save GSX File or HCP Project");
		JButton openwebdav = new JButton(new ImageIcon(GSConstants.ICON_PATH+"openwebdav.png"));
		openwebdav.addActionListener(new OpenActionListener(1));
		openwebdav.setToolTipText("Open WebDAV");
		JButton savewebdav = new JButton(new ImageIcon(GSConstants.ICON_PATH+"savewebdav.png"));
		savewebdav.addActionListener(new SaveActionListener(1));
		savewebdav.setToolTipText("Save to WebDAV");
		this.add(open);
		this.add(save);
		this.add(openwebdav);
		this.add(savewebdav);
	}
}
