/* $Id: GSEditorTextPane.java 701 2013-05-13 02:06:09Z ohura $ */
package smart_gs.smleditor.swingui;


import java.awt.Point;

import javax.swing.text.SimpleAttributeSet;
import javax.swing.text.html.HTML;

import org.w3c.dom.Element;
import org.xml.sax.SAXException;

import smart_gs.logical.SmartDocument;
import smart_gs.logical.IDAT;
import sml_editor.swingui.EditorTextPane;

@SuppressWarnings("serial")
public class GSEditorTextPane extends EditorTextPane{
	
	private boolean isSourceMode = false;
	
	public GSEditorTextPane(SmartDocument document) {
		this(document,null);
	}
	public GSEditorTextPane(SmartDocument document,String source) {
		super(source);
		this.document = document;
	}
	public void setSmartDocument(SmartDocument document){
		this.document = document;
	}
	public SmartDocument getSmartDocument(){
		return this.document;
	}
	public void save(){
		this.document.setSource("<xml><html>" + this.getSource("body") + "</html></xml>");
	}
	public void load(){
		this.setSource(this.document.getSource());
	}
	
}
