edu.rice.cs.util.text
Interface AbstractDocumentInterface

All Known Subinterfaces:
DJDocument, OpenDefinitionsDocument, SwingDocumentInterface
All Known Implementing Classes:
AbstractDJDocument, AbstractGlobalModel.ConcreteOpenDefDoc, DefaultGlobalModel.ConcreteOpenDefDoc, DefinitionsDocument, DummyOpenDefDoc, ErrorPanel.ErrorDocument, InteractionsDJDocument, SwingDocument, TestDocGetter.TestOpenDoc

public interface AbstractDocumentInterface

An interface designed to augment the Swing Document interface with useful operations including operations like append that cannot be safely implemented in terms of the methods provided by the Document interface. Operations like append require write locking the document which cannot be done using the Document interface.


Method Summary
 void append(String str, AttributeSet set)
          Appends given string with specified attributes to end of this document.
 Position createPosition(int offs)
          Creates a "sticky" position within a document
 int getLength()
           
 String getText()
           
 String getText(int offset, int length)
           
 void insertString(int offset, String str, AttributeSet a)
           
 void remove(int offset, int length)
           
 

Method Detail

getLength

int getLength()

getText

String getText(int offset,
               int length)
               throws BadLocationException
Throws:
BadLocationException

getText

String getText()

insertString

void insertString(int offset,
                  String str,
                  AttributeSet a)
                  throws BadLocationException
Throws:
BadLocationException

remove

void remove(int offset,
            int length)
            throws BadLocationException
Throws:
BadLocationException

createPosition

Position createPosition(int offs)
                        throws BadLocationException
Creates a "sticky" position within a document

Throws:
BadLocationException

append

void append(String str,
            AttributeSet set)
Appends given string with specified attributes to end of this document.