Get Bounce at SourceForge.net. Fast secure and Free Open Source software downloads

org.bounce.text.xml
Class XMLScanner

java.lang.Object
  extended by org.bounce.text.SyntaxHighlightingScanner
      extended by org.bounce.text.xml.XMLScanner

public class XMLScanner
extends SyntaxHighlightingScanner

Associates XML input stream characters with XML specific styles.

Note: The XML Editor package is based on the JavaEditorKit example as described in the article 'Customizing a Text Editor' by Timothy Prinzing . See: http://java.sun.com/products/jfc/tsc/articles/text/editor_kit/

Version:
$Revision: 1.5 $, $Date: 2009/01/22 22:14:59 $
Author:
Edwin Dankert

Nested Class Summary
(package private)  class XMLScanner.Scanner
          Abstract scanner class..
 
Field Summary
 
Fields inherited from class org.bounce.text.SyntaxHighlightingScanner
error, in, pos, start, token, valid
 
Constructor Summary
XMLScanner(javax.swing.text.Document document)
          Constructs a scanner for the Document.
 
Method Summary
 int getEventType()
           
 int getNextTag()
           
 long scan()
          Scans the Xml Stream for XML specific tokens.
 void setRange(int start, int end)
          Sets the scanning range.
 
Methods inherited from class org.bounce.text.SyntaxHighlightingScanner
getEndOffset, getStartOffset, isError, isValid, setValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLScanner

public XMLScanner(javax.swing.text.Document document)
           throws java.io.IOException
Constructs a scanner for the Document.

Parameters:
document - the document containing the XML content.
Throws:
java.io.IOException
Method Detail

getEventType

public int getEventType()

getNextTag

public int getNextTag()
               throws java.io.IOException
Throws:
java.io.IOException

setRange

public void setRange(int start,
                     int end)
              throws java.io.IOException
Sets the scanning range.

Overrides:
setRange in class SyntaxHighlightingScanner
Parameters:
start - the start of the range.
end - the end of the range.
Throws:
java.io.IOException

scan

public long scan()
          throws java.io.IOException
Scans the Xml Stream for XML specific tokens.

Specified by:
scan in class SyntaxHighlightingScanner
Returns:
the last location.
Throws:
java.io.IOException

Get Bounce at SourceForge.net. Fast secure and Free Open Source software downloads

Copyright 2002-2002-2009 Edwin Dankert. All Rights Reserved.