/* $Id: LineSegEditorGSMenuBar.java $ */
package smart_gs.smleditor.swingui;

import javax.swing.JMenu;
import javax.swing.JMenuBar;

import smart_gs.menu.EditMenu;
import smart_gs.menu.FileMenu;
import smart_gs.menu.LineSegFileMenu;
import smart_gs.menu.LineSegToolMenu;
import smart_gs.menu.ToolMenu;

@SuppressWarnings("serial")
public class LineSegEditorGSMenuBar extends JMenuBar{
	private EditMenu editMenu;
	private JMenu fileMenu;
	private JMenu fileMenuXML;
	private JMenu fileMenuSegfo;


	public LineSegEditorGSMenuBar(LineSegEditor parent,String type){
		//HERE
		this.fileMenuXML = new LineSegFileMenu(parent,"xml");
		this.fileMenuSegfo = new LineSegFileMenu(parent,"segfo");
		this.fileMenu = type.equals("xml")?this.fileMenuXML:this.fileMenuSegfo;
		this.add(this.fileMenu);

		JMenu toolMenu = new LineSegToolMenu("Tool", parent);		
		this.add(toolMenu);
	}

	public void setLineSegEditorGSMenuBar(String type){
		this.remove(this.fileMenu);
		this.fileMenu = type.equals("xml")?this.fileMenuXML:this.fileMenuSegfo;
		this.add(this.fileMenu);
	}
	
}

