1 16 17 package swingwtx.swing.event; 18 19 import swingwtx.swing.text.*; 20 21 public interface DocumentEvent { 22 23 public interface ElementChange { 24 public Element getElement(); 25 public int getIndex(); 26 public Element[] getChildrenRemoved(); 27 public Element[] getChildrenAdded(); 28 } 29 30 public int getOffset(); 31 public int getLength(); 32 public Document getDocument(); 33 public EventType getType(); 34 public ElementChange getChange(Element elem); 35 36 public static final class EventType { 37 private EventType(String s) { 38 typeString = s; 39 } 40 public static final EventType INSERT = new EventType("INSERT"); 41 public static final EventType REMOVE = new EventType("REMOVE"); 42 public static final EventType CHANGE = new EventType("CHANGE"); 43 public String toString() { 44 return typeString; 45 } 46 private String typeString; 47 } 48 } | Popular Tags |