package jp.ac.kyutech.mns.ist.plugin;

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

import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;

import jp.ac.kyutech.mns.ist.Sheet;

import edu.umd.cs.piccolo.PCanvas;

public class SheetPlugin_SheetMap extends DefaultPlugin implements ActionListener {
	Sheet sheet;
	PCanvas canvas;
	boolean isActive = false;
	
	public SheetPlugin_SheetMap(PCanvas can, Sheet f){
		canvas = can;
		sheet = f;
	}

	public void setEnabled(boolean b){
		if (b){
		} else {
			
		}
	}
	public void actionPerformed(ActionEvent e){
		System.out.println(e.getActionCommand());
		if (e.getActionCommand().equals("Start")){
			setEnabled(true);
		} else if (e.getActionCommand().equals("Stop")){
			setEnabled(false);
		}
	}
	public void addMenu(JPopupMenu menu){
		JMenu insM;

		insM = new JMenu("SheetMap");

		JMenuItem mi;

		mi = new JMenuItem("Start");
		mi.addActionListener(this);
		insM.add(mi);

		mi = new JMenuItem("Stop");
		mi.addActionListener(this);
		insM.add(mi);


		menu.add(insM);
	}
}
