package smart_gs.swingui.toolbar.action;

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

import smart_gs.logical.Spread;
import smart_gs.swingui.AbstractGSWindow;

public class RedoActionListener implements ActionListener {
	AbstractGSWindow parent;

	public RedoActionListener(AbstractGSWindow parent) {
		this.parent = parent;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		Spread spread = this.parent.getSpread();
		if (spread == null) {
			return;
		} else {
			spread.redoRegion();
			this.parent.validate();
			this.parent.repaint();
		}
	}
}
