/* $Id: ChangeMainTypeAction.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.PreferenceManager;
import smart_gs.logical.Spread;
import smart_gs.swingui.WorkspaceWindow;

public class ChangeMainTypeAction implements ActionListener{
	private int type;
	public ChangeMainTypeAction(int type) {
		this.type = type;
	}
	public void actionPerformed(ActionEvent e) {
		PreferenceManager.getInstance().setMainDocumentType(type);
		Spread spread  = WorkspaceWindow.getInstance().getSpread();
		WorkspaceWindow.getInstance().setSpread(spread);
	}
}
