1 16 package swingwtx.swing.text; 17 18 import swingwtx.swing.event.*; 19 20 public interface Document { 21 22 public static final String StreamDescriptionProperty = "stream"; 23 public static final String 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 getProperty(Object key); 31 public void putProperty(Object key, Object value); 32 public void remove(int offs, int len) throws BadLocationException; 33 public void insertString(int offset, String str, AttributeSet a) throws BadLocationException; 34 public String 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 r); 42 } | Popular Tags |