lexx.gui.editor
Class LexxDocument

java.lang.Object
  |
  +--javax.swing.text.AbstractDocument
        |
        +--javax.swing.text.DefaultStyledDocument
              |
              +--lexx.gui.editor.LexxDocument
All Implemented Interfaces:
javax.swing.text.Document, java.io.Serializable, javax.swing.text.StyledDocument

public final class LexxDocument
extends javax.swing.text.DefaultStyledDocument

An alternative way to add the DocumentListeners to the editor

Copyright (c) 2002-2003

Since:
25/02/2003
Version:
0.8
Author:
Mohammed Imran
See Also:
Serialized Form

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
LexxDocument(JavaPackages packages, javax.swing.JTextPane pane)
           
 
Method Summary
 java.awt.Dimension getCoord(int position)
           
 int getPos(int line, int col)
           
protected  void insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent chng, javax.swing.text.AttributeSet attr)
           
 boolean isDebugASTVisible()
           
 boolean isSyntaxHighlighting()
           
protected  void removeUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent chng)
           
 void setHighlight(boolean answer)
           
 void setVisibleDebugAST(boolean answer)
           
 
Methods inherited from class javax.swing.text.DefaultStyledDocument
addDocumentListener, addStyle, create, createDefaultRoot, getBackground, getCharacterElement, getDefaultRootElement, getFont, getForeground, getLogicalStyle, getParagraphElement, getStyle, getStyleNames, insert, removeDocumentListener, removeStyle, 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, insertString, postRemoveUpdate, putProperty, readLock, readUnlock, remove, 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, insertString, putProperty, remove, removeUndoableEditListener, render
 

Constructor Detail

LexxDocument

public LexxDocument(JavaPackages packages,
                    javax.swing.JTextPane pane)
Method Detail

setVisibleDebugAST

public final void setVisibleDebugAST(boolean answer)

isDebugASTVisible

public final boolean isDebugASTVisible()

setHighlight

public final void setHighlight(boolean answer)

isSyntaxHighlighting

public final boolean isSyntaxHighlighting()

getCoord

public final java.awt.Dimension getCoord(int position)

getPos

public final int getPos(int line,
                        int col)

insertUpdate

protected final void insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent chng,
                                  javax.swing.text.AttributeSet attr)
Overrides:
insertUpdate in class javax.swing.text.DefaultStyledDocument
Parameters:
chng - the change event
attr - the set of attributes

removeUpdate

protected final void removeUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent chng)
Overrides:
removeUpdate in class javax.swing.text.DefaultStyledDocument
Parameters:
chng - the change event