1 package org.apache.ojb.tools.mapping.reversedb2.propertyEditors; 2 3 17 18 31 public abstract class EditableTreeNodeWithProperties 32 implements javax.swing.tree.TreeNode , 33 org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorTarget, 34 java.io.Serializable 35 { 36 static final long serialVersionUID = -8720549176372985715L; 37 private java.util.HashMap hmAttributes = new java.util.HashMap (); 38 39 protected java.beans.PropertyChangeSupport propertyChangeDelegate = new 40 java.beans.PropertyChangeSupport (this); 41 42 43 public EditableTreeNodeWithProperties() 44 { 45 } 46 47 52 public void addPropertyChangeListener (java.beans.PropertyChangeListener listener) 53 { 54 this.propertyChangeDelegate.addPropertyChangeListener(listener); 55 } 56 57 63 public void addPropertyChangeListener (String propertyName, java.beans.PropertyChangeListener listener) 64 { 65 this.propertyChangeDelegate.addPropertyChangeListener(propertyName, listener); 66 } 67 68 73 public void removePropertyChangeListener (java.beans.PropertyChangeListener listener) 74 { 75 this.propertyChangeDelegate.removePropertyChangeListener (listener); 76 } 77 78 84 public void removePropertyChangeListener (String propertyName, java.beans.PropertyChangeListener listener) 85 { 86 this.propertyChangeDelegate.removePropertyChangeListener(propertyName, listener); 87 } 88 89 93 public Object getAttribute(String strKey) 94 { 95 return hmAttributes.get(strKey); 96 } 97 98 103 public void setAttribute(String strKey, Object value) 104 { 105 this.propertyChangeDelegate.firePropertyChange(strKey, 106 hmAttributes.put(strKey, value), value); 107 } 108 109 } 110 | Popular Tags |