KickJava   Java API By Example, From Geeks To Geeks.

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


1 package swingwtx.swing.text;
2
3 public class DocumentFilter
4 {
5     public void remove(FilterBypass fb, int offset, int length) throws BadLocationException
6     {
7         fb.remove(offset, length);
8     }
9
10     public void insertString(FilterBypass fb, int offset, String JavaDoc string, AttributeSet attr) throws BadLocationException
11     {
12         fb.insertString(offset, string, attr);
13     }
14
15     public void replace(FilterBypass fb, int offset, int length, String JavaDoc text, AttributeSet attrs)
16             throws BadLocationException
17     {
18         fb.replace(offset, length, text, attrs);
19     }
20
21     public static abstract class FilterBypass
22     {
23         public abstract Document getDocument();
24         public abstract void remove(int offset, int length) throws BadLocationException;
25         public abstract void insertString(int offset, String JavaDoc string, AttributeSet attr)
26                 throws BadLocationException;
27         public abstract void replace(int offset, int length, String JavaDoc string, AttributeSet attrs)
28                 throws BadLocationException;
29     }
30 }
31
Popular Tags