org.apache.batik.util.gui.xmleditor

Class XMLDocument

public class XMLDocument extends PlainDocument

A document that can be marked up using XML style.
Field Summary
protected XMLTokencacheToken
protected XMLContextcontext
protected XMLScannerlexer
Constructor Summary
XMLDocument()
XMLDocument(XMLContext context)
Creates a new instance of XMLDocument
Method Summary
intfind(String str, int fromIndex, boolean caseSensitive)
Find the first occurrence of the specified String starting at the specified index.
XMLTokengetScannerStart(int pos)
Return XMLToken
voidinsertString(int offset, String str, AttributeSet a)
voidremove(int offs, int len)

Field Detail

cacheToken

protected XMLToken cacheToken

context

protected XMLContext context

lexer

protected XMLScanner lexer

Constructor Detail

XMLDocument

public XMLDocument()

XMLDocument

public XMLDocument(XMLContext context)
Creates a new instance of XMLDocument

Parameters: context XMLContext

Method Detail

find

public int find(String str, int fromIndex, boolean caseSensitive)
Find the first occurrence of the specified String starting at the specified index.

Parameters: str String to find fromIndex caseSensitive true or false

Returns: the offset if the string argument occurs as a substring, otherwise return -1

Throws: BadLocationException if fromIndex was not a valid part of the document

getScannerStart

public XMLToken getScannerStart(int pos)
Return XMLToken

Parameters: pos position

Returns: XMLToken

insertString

public void insertString(int offset, String str, AttributeSet a)
{@inheritDoc }

remove

public void remove(int offs, int len)
{@inheritDoc }
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.