package smart_gs.swingui.toolbar.action;

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

import smart_gs.drawing_tool.drawing_mode.DeleteMode;
import smart_gs.drawing_tool.state.DefaultState;
import smart_gs.swingui.AbstractGSWindow;

public class DeleteActionListener implements ActionListener {
	AbstractGSWindow parent;
	public DeleteActionListener(AbstractGSWindow abstractGSWindow) {
		this.parent = abstractGSWindow;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		DefaultState.getInstance().setMode(DeleteMode.getInstance());
		this.parent.setMode(DeleteMode.getInstance());
		this.parent.repaint();
	}

}
