KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > swingwtx > swing > text > Document


1 /*
2    SwingWT
3    Copyright(c)2003-2004, R. Rawson-Tetley
4
5    For more information on distributing and using this program, please
6    see the accompanying "COPYING" file.
7
8    Contact me by electronic mail: bobintetley@users.sourceforge.net
9
10    $Log: Document.java,v $
11    Revision 1.1 2004/01/26 08:11:14 bobintetley
12    Many bugfixes and addition of SwingSet
13
14
15 */

16 package swingwtx.swing.text;
17
18 import swingwtx.swing.event.*;
19
20 public interface Document {
21
22     public static final String JavaDoc StreamDescriptionProperty = "stream";
23     public static final String JavaDoc TitleProperty = "title";
24     
25     public int getLength();
26     public void addDocumentListener(DocumentListener listener);
27     public void removeDocumentListener(DocumentListener listener);
28     public void addUndoableEditListener(UndoableEditListener listener);
29     public void removeUndoableEditListener(UndoableEditListener listener);
30     public Object JavaDoc getProperty(Object JavaDoc key);
31     public void putProperty(Object JavaDoc key, Object JavaDoc value);
32     public void remove(int offs, int len) throws BadLocationException;
33     public void insertString(int offset, String JavaDoc str, AttributeSet a) throws BadLocationException;
34     public String JavaDoc getText(int offset, int length) throws BadLocationException;
35     public void getText(int offset, int length, Segment txt) throws BadLocationException;
36     public Position getStartPosition();
37     public Position getEndPosition();
38     public Position createPosition(int offs) throws BadLocationException;
39     public Element[] getRootElements();
40     public Element getDefaultRootElement();
41     public void render(Runnable JavaDoc r);
42 }
Popular Tags