/* $Id: RemoveTagAction.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 RemoveTagAction implements ActionListener{
	
	protected EditorTextPane textPane;
	
	protected int start;
	protected int end;
	
	public RemoveTagAction() {
	}
	public RemoveTagAction(EditorTextPane textPane){
		this.textPane = textPane;
	}
	public void setEditorTextPane(EditorTextPane textPane){
		this.textPane = textPane;
	}
	public void actionPerformed(ActionEvent e) {
		this.start = this.textPane.getGSHTMLEditorTextPane().getSelectionStart();
		this.end = this.textPane.getGSHTMLEditorTextPane().getSelectionEnd();
//		this.textPane.getGSHTMLEditorTextPane().getController().removeTag(start,end);
		this.textPane.getGSHTMLEditorTextPane().updateText();
	}
}
