1 19 package org.netbeans.tax.event; 20 21 import java.beans.PropertyChangeEvent ; 22 23 import org.netbeans.tax.TreeObject; 24 import org.netbeans.tax.TreeNode; 25 26 31 public class TreeEvent extends PropertyChangeEvent { 32 35 36 private static final long serialVersionUID =-4899604850035092773L; 37 38 39 private boolean bubbling; 40 41 42 private TreeObject originalSource; 44 45 private String originalPropertyName; 46 47 48 50 51 55 56 private TreeEvent (TreeObject source, String propertyName, Object oldValue, Object newValue, TreeObject originalSource, String originalPropertyName) { 57 super (source, propertyName, oldValue, newValue); 58 59 this.bubbling = ( originalSource != null ); 60 this.originalSource = originalSource; 61 this.originalPropertyName = originalPropertyName; 62 } 63 64 65 public TreeEvent (TreeObject source, String propertyName, Object oldValue, Object newValue) { 66 this (source, propertyName, oldValue, newValue, null, null); 67 } 68 69 70 74 78 public final boolean isBubbling () { 79 return bubbling; 80 } 81 82 84 public final TreeObject getOriginalSource () { 85 return originalSource; 86 } 87 88 90 public final String getOriginalPropertyName () { 91 return originalPropertyName; 92 } 93 94 96 public final TreeEvent createBubbling (TreeNode currentNode) { 97 return new TreeEvent (currentNode, TreeNode.PROP_NODE, null, null, (TreeObject)this.getSource (), this.getPropertyName ()); 98 } 99 100 } 101 | Popular Tags |