au.com.zip.cs.dev
Class LinedDocument

java.lang.Object
  extended by java.util.AbstractCollection
      extended by java.util.AbstractList
          extended by java.util.ArrayList
              extended by au.com.zip.cs.dev.LinedDocument
All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, List, RandomAccess, Document
Direct Known Subclasses:
CursedLinedDocument

public class LinedDocument
extends ArrayList
implements Document

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
 
Constructor Summary
LinedDocument()
           
 
Method Summary
 void addDocumentListener(DocumentListener l)
           
 void addUndoableEditListener(UndoableEditListener l)
           
 Position createPosition(int offset)
           
 Element getDefaultRootElement()
           
 Position getEndPosition()
           
 int getLength()
           
 au.com.zip.cs.dev.LinedDocument.LDElement getLine(int ndx)
           
 Object getProperty(Object key)
           
 Element[] getRootElements()
           
 Position getStartPosition()
           
 String getText(int offset, int length)
           
 void getText(int offset, int length, Segment seg)
           
 void insertString(int offset, String str, AttributeSet attrs)
           
 void putProperty(Object key, Object value)
           
 void remove(int offset, int length)
           
 void removeDocumentListener(DocumentListener l)
           
 void removeUndoableEditListener(UndoableEditListener l)
           
 void render(Runnable t)
           
 void setLine(int ndx, int offset, String line)
           
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

LinedDocument

public LinedDocument()
Method Detail

render

public void render(Runnable t)
Specified by:
render in interface Document

getLine

public final au.com.zip.cs.dev.LinedDocument.LDElement getLine(int ndx)

setLine

public final void setLine(int ndx,
                          int offset,
                          String line)

getText

public final String getText(int offset,
                            int length)
                     throws BadLocationException
Specified by:
getText in interface Document
Throws:
BadLocationException

getText

public final void getText(int offset,
                          int length,
                          Segment seg)
                   throws BadLocationException
Specified by:
getText in interface Document
Throws:
BadLocationException

createPosition

public Position createPosition(int offset)
Specified by:
createPosition in interface Document

getStartPosition

public final Position getStartPosition()
Specified by:
getStartPosition in interface Document

getEndPosition

public final Position getEndPosition()
Specified by:
getEndPosition in interface Document

getLength

public final int getLength()
Specified by:
getLength in interface Document

getProperty

public Object getProperty(Object key)
Specified by:
getProperty in interface Document

putProperty

public void putProperty(Object key,
                        Object value)
Specified by:
putProperty in interface Document

remove

public final void remove(int offset,
                         int length)
                  throws BadLocationException
Specified by:
remove in interface Document
Throws:
BadLocationException

insertString

public final void insertString(int offset,
                               String str,
                               AttributeSet attrs)
                        throws BadLocationException
Specified by:
insertString in interface Document
Throws:
BadLocationException

addDocumentListener

public final void addDocumentListener(DocumentListener l)
Specified by:
addDocumentListener in interface Document

addUndoableEditListener

public final void addUndoableEditListener(UndoableEditListener l)
Specified by:
addUndoableEditListener in interface Document

removeDocumentListener

public final void removeDocumentListener(DocumentListener l)
Specified by:
removeDocumentListener in interface Document

removeUndoableEditListener

public final void removeUndoableEditListener(UndoableEditListener l)
Specified by:
removeUndoableEditListener in interface Document

getRootElements

public final Element[] getRootElements()
Specified by:
getRootElements in interface Document

getDefaultRootElement

public final Element getDefaultRootElement()
Specified by:
getDefaultRootElement in interface Document