Java 2 Platform
v1.3

edu.umich.visualsoar.ruleeditor
Class SoarDocument

java.lang.Object
  |
  +--javax.swing.text.AbstractDocument
        |
        +--javax.swing.text.DefaultStyledDocument
              |
              +--edu.umich.visualsoar.ruleeditor.SoarDocument
All Implemented Interfaces:
javax.swing.text.Document, java.io.Serializable, javax.swing.text.StyledDocument

public class SoarDocument
extends javax.swing.text.DefaultStyledDocument

See Also:
Serialized Form

Nested Class Summary
(package private)  class SoarDocument.ColorSyntaxThread
           
 
Nested classes 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 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
(package private)  edu.umich.visualsoar.misc.SyntaxColor[] colorTable
           
(package private)  edu.umich.visualsoar.misc.Preferences prefs
           
(package private)  javax.swing.text.AbstractDocument.AbstractElement root
           
 
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
SoarDocument()
           
 
Method Summary
 int autoJustify(int caretPos)
           
(package private)  void colorRange(int begPos, int length, int kind)
           
 void colorSyntax(int caretPos)
           
 void colorSyntax(int caretPos, int length, java.io.Reader r)
           
 void colorSyntax(java.io.Reader r)
           
(package private)  void evaluateToken(edu.umich.visualsoar.parser.Token currToken, int startOffset, edu.umich.visualsoar.parser.SoarParserTokenManager mgr)
           
(package private)  java.lang.String getElementString(javax.swing.text.Element element, javax.swing.text.AbstractDocument.Content content)
           
(package private)  java.lang.String getElementString(javax.swing.text.Element element, javax.swing.text.AbstractDocument.Content content, int startOffset)
           
(package private)  java.lang.String getElementString(int elementIndex, javax.swing.text.AbstractDocument.Content content)
           
 void insertString(int offset, java.lang.String str, javax.swing.text.AttributeSet a)
           
 void remove(int offs, int len)
           
(package private)  void replaceRange(java.lang.String str, int start, int end)
           
 
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
addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, postRemoveUpdate, putProperty, readLock, readUnlock, removeUndoableEditListener, 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
addUndoableEditListener, createPosition, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, putProperty, removeUndoableEditListener, render
 

Field Detail

root

javax.swing.text.AbstractDocument.AbstractElement root

colorTable

edu.umich.visualsoar.misc.SyntaxColor[] colorTable

prefs

edu.umich.visualsoar.misc.Preferences prefs
Constructor Detail

SoarDocument

public SoarDocument()
Method Detail

insertString

public void insertString(int offset,
                         java.lang.String str,
                         javax.swing.text.AttributeSet a)
                  throws javax.swing.text.BadLocationException
Specified by:
insertString in interface javax.swing.text.Document
Overrides:
insertString in class javax.swing.text.AbstractDocument
javax.swing.text.BadLocationException

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
javax.swing.text.BadLocationException

replaceRange

void replaceRange(java.lang.String str,
                  int start,
                  int end)

getElementString

java.lang.String getElementString(int elementIndex,
                                  javax.swing.text.AbstractDocument.Content content)

getElementString

java.lang.String getElementString(javax.swing.text.Element element,
                                  javax.swing.text.AbstractDocument.Content content)

getElementString

java.lang.String getElementString(javax.swing.text.Element element,
                                  javax.swing.text.AbstractDocument.Content content,
                                  int startOffset)

colorRange

void colorRange(int begPos,
                int length,
                int kind)

evaluateToken

void evaluateToken(edu.umich.visualsoar.parser.Token currToken,
                   int startOffset,
                   edu.umich.visualsoar.parser.SoarParserTokenManager mgr)

colorSyntax

public void colorSyntax(java.io.Reader r)

colorSyntax

public void colorSyntax(int caretPos)

colorSyntax

public void colorSyntax(int caretPos,
                        int length,
                        java.io.Reader r)

autoJustify

public int autoJustify(int caretPos)

Java 2 Platform
v1.3