/* $Id: RedoAction.java 125 2011-03-09 09:49:51Z ohura $ */
package sml_editor.swingui.toolbar.action;

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

import sml_editor.swingui.EditorTextPane;


public class RedoAction implements ActionListener{
	
	private EditorTextPane textPane;
	protected boolean keyevent = true;
	public RedoAction() {
	}
	public RedoAction(EditorTextPane textPane){
		this.textPane = textPane;
		if(textPane != null){
			this.textPane.getRedoAction().setKeyEvent(keyevent);
		}
	}
	public void setKeyEvent(boolean keyevent){
		this.keyevent = keyevent;
	}
	public void setEditorTextPane(EditorTextPane textPane){
		this.textPane = textPane;
		if(textPane != null){
			this.textPane.getRedoAction().setKeyEvent(keyevent);
		}
	}
	public void actionPerformed(ActionEvent e) {
//		this.textPane.getGSHTMLEditorTextPane().getController().redo();
		if(textPane != null){
			this.textPane.getRedoAction().actionPerformed(e);
		}
	}
}
