adalogo.gui.editor

Class SyntaxDocument


public class SyntaxDocument
extends DefaultStyledDocument

hardcoded syntax highlighter.

original code from The_Developer
http://forum.java.sun.com/thread.jspa?threadID=589109

Constructor Summary

SyntaxDocument()

Method Summary

protected String
getEscapeString(String quoteDelimiter)
protected String
getSingleLineDelimiter()
void
insertString(int offset, String str, AttributeSet a)
Override to apply syntax highlighting after the document has been updated
protected boolean
isDelimiter(String character)
protected boolean
isKeyword(String token)
protected boolean
isNumberConstant(String character)
protected boolean
isQuoteDelimiter(String character)
void
remove(int offset, int length)
Override to apply syntax highlighting after the document has been updated

Constructor Details

SyntaxDocument

public SyntaxDocument()

Method Details

getEscapeString

protected String getEscapeString(String quoteDelimiter)


getSingleLineDelimiter

protected String getSingleLineDelimiter()


insertString

public void insertString(int offset,
                         String str,
                         AttributeSet a)
            throws BadLocationException
Override to apply syntax highlighting after the document has been updated


isDelimiter

protected boolean isDelimiter(String character)


isKeyword

protected boolean isKeyword(String token)


isNumberConstant

protected boolean isNumberConstant(String character)


isQuoteDelimiter

protected boolean isQuoteDelimiter(String character)


remove

public void remove(int offset,
                   int length)
            throws BadLocationException
Override to apply syntax highlighting after the document has been updated