org.apache.batik.util.gui.xmleditor

Class XMLTextEditor

public class XMLTextEditor extends JEditorPane

Simple Text Component to edit xml document with integrated undo / redo behaviour. If you looking for how to create editor component with syntax highlight, just create any JEditorPane and supply it with XMLEditoKit eg:
 JEditorPane editor = new JEditorPane();
 editor.setEditorKitForContentType(XMLEditorKit.XML_MIME_TYPE, new XMLEditorKit();
 editor.setContentType(XMLEditorKit.XML_MIME_TYPE);
 
Field Summary
protected UndoManagerundoManager
Constructor Summary
XMLTextEditor()
Creates a new instance of XMLEditorPane
Method Summary
voidgotoLine(int line)
Move the cursor to the specified line if exception occur cursor not change
voidredo()
Redo
voidsetText(String t)
voidundo()
Undo

Field Detail

undoManager

protected UndoManager undoManager

Constructor Detail

XMLTextEditor

public XMLTextEditor()
Creates a new instance of XMLEditorPane

Method Detail

gotoLine

public void gotoLine(int line)
Move the cursor to the specified line if exception occur cursor not change

Parameters: line the specified line number

redo

public void redo()
Redo

setText

public void setText(String t)
{@inheritDoc }

undo

public void undo()
Undo
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.