rasmus.interpreter.ui
Class RSyntaxDocument

java.lang.Object
  extended by javax.swing.text.AbstractDocument
      extended by javax.swing.text.DefaultStyledDocument
          extended by rasmus.interpreter.ui.RSyntaxDocument
All Implemented Interfaces:
java.io.Serializable, javax.swing.text.Document, javax.swing.text.StyledDocument

public class RSyntaxDocument
extends javax.swing.text.DefaultStyledDocument

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.text.DefaultStyledDocument
javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit, javax.swing.text.DefaultStyledDocument.ElementBuffer, javax.swing.text.DefaultStyledDocument.ElementSpec, javax.swing.text.DefaultStyledDocument.SectionElement
 
Nested classes/interfaces inherited from class javax.swing.text.AbstractDocument
javax.swing.text.AbstractDocument.AbstractElement, javax.swing.text.AbstractDocument.AttributeContext, javax.swing.text.AbstractDocument.BranchElement, javax.swing.text.AbstractDocument.Content, javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AbstractDocument.ElementEdit, javax.swing.text.AbstractDocument.LeafElement
 
Field Summary
 
Fields inherited from class javax.swing.text.DefaultStyledDocument
buffer, BUFFER_SIZE_DEFAULT
 
Fields inherited from class javax.swing.text.AbstractDocument
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName
 
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
 
Constructor Summary
RSyntaxDocument(NameSpace namespace)
           
 
Method Summary
 void addUndoableEditListener(javax.swing.event.UndoableEditListener listener)
           
 int applyHighlighting(int offs, int len)
           
 int[] extractFunctionCall(int offs)
           
 int[] extractNormalToken(int offs)
           
 int findNextSameStatus(int offs, int statusA, int statusB)
           
protected  void fireInsertUpdate(javax.swing.event.DocumentEvent evt)
           
protected  void fireRemoveUpdate(javax.swing.event.DocumentEvent evt)
           
 char getCharAfterString(int offs)
           
 int parseStatus(int offs)
           
 void processToken(int offs, int len)
           
 void remove(int offs, int len)
           
 void removeUndoableEditListener(javax.swing.event.UndoableEditListener listener)
           
 void setText(java.lang.String text)
           
 
Methods inherited from class javax.swing.text.DefaultStyledDocument
addDocumentListener, addStyle, create, createDefaultRoot, getBackground, getCharacterElement, getDefaultRootElement, getFont, getForeground, getLogicalStyle, getParagraphElement, getStyle, getStyleNames, insert, insertUpdate, removeDocumentListener, removeStyle, removeUpdate, setCharacterAttributes, setLogicalStyle, setParagraphAttributes, styleChanged
 
Methods inherited from class javax.swing.text.AbstractDocument
createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, insertString, postRemoveUpdate, putProperty, readLock, readUnlock, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.text.Document
createPosition, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, insertString, putProperty, render
 

Constructor Detail

RSyntaxDocument

public RSyntaxDocument(NameSpace namespace)
Method Detail

setText

public void setText(java.lang.String text)

extractFunctionCall

public int[] extractFunctionCall(int offs)
                          throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException

extractNormalToken

public int[] extractNormalToken(int offs)
                         throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException

addUndoableEditListener

public void addUndoableEditListener(javax.swing.event.UndoableEditListener listener)
Specified by:
addUndoableEditListener in interface javax.swing.text.Document
Overrides:
addUndoableEditListener in class javax.swing.text.AbstractDocument

removeUndoableEditListener

public void removeUndoableEditListener(javax.swing.event.UndoableEditListener listener)
Specified by:
removeUndoableEditListener in interface javax.swing.text.Document
Overrides:
removeUndoableEditListener in class javax.swing.text.AbstractDocument

fireInsertUpdate

protected void fireInsertUpdate(javax.swing.event.DocumentEvent evt)
Overrides:
fireInsertUpdate in class javax.swing.text.AbstractDocument

fireRemoveUpdate

protected void fireRemoveUpdate(javax.swing.event.DocumentEvent evt)
Overrides:
fireRemoveUpdate in class javax.swing.text.AbstractDocument

remove

public void remove(int offs,
                   int len)
            throws javax.swing.text.BadLocationException
Specified by:
remove in interface javax.swing.text.Document
Overrides:
remove in class javax.swing.text.AbstractDocument
Throws:
javax.swing.text.BadLocationException

applyHighlighting

public int applyHighlighting(int offs,
                             int len)
                      throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException

getCharAfterString

public char getCharAfterString(int offs)
                        throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException

processToken

public void processToken(int offs,
                         int len)
                  throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException

findNextSameStatus

public int findNextSameStatus(int offs,
                              int statusA,
                              int statusB)
                       throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException

parseStatus

public int parseStatus(int offs)
                throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException