1 2 15 package org.wings.event; 16 17 import org.wings.text.SDocument; 18 19 import java.awt.*; 20 21 25 public class SDocumentEvent extends AWTEvent { 26 public final static int CHANGE = 1; 27 public final static int INSERT = 2; 28 public final static int REMOVE = 3; 29 30 private int offset; 31 private int length; 32 33 public SDocumentEvent(SDocument document, int offset, int length, int type) { 34 super(document, type); 35 this.offset = offset; 36 this.length = length; 37 } 38 39 public SDocument getDocument() { 40 return (SDocument) getSource(); 41 } 42 43 public int getOffset() { 44 return offset; 45 } 46 47 public int getLength() { 48 return length; 49 } 50 51 public int getType() { 52 return getID(); 53 } 54 } 55 | Popular Tags |