1 19 20 package org.netbeans.modules.editor.structure.api; 21 22 import java.util.EventObject ; 23 24 25 43 public final class DocumentElementEvent extends EventObject { 44 45 private DocumentElement changedChild; 47 private int type; 48 49 50 public static final int CONTENT_CHANGED = 1; 51 52 53 public static final int CHILD_ADDED = 2; 54 55 56 public static final int CHILD_REMOVED = 3; 57 58 59 public static final int CHILDREN_REORDERED = 4; 60 61 62 public static final int ATTRIBUTES_CHANGED = 5; 63 64 DocumentElementEvent(int type, DocumentElement source, DocumentElement changedChild) { 65 super(source); 66 this.type = type; 67 this.changedChild = changedChild; 68 } 69 70 71 public DocumentElement getSourceDocumentElement() { 72 return (DocumentElement)getSource(); 73 } 74 75 76 public DocumentElement getChangedChild() { 77 return this.changedChild; 78 } 79 80 81 public int getType() { 82 return type; 83 } 84 } 85 86 | Popular Tags |