1 19 20 package org.netbeans.api.debugger; 21 22 import java.beans.PropertyChangeListener ; 23 import java.beans.PropertyChangeSupport ; 24 25 26 32 public final class Watch { 33 34 35 public static final String PROP_EXPRESSION = "expression"; 37 public static final String PROP_VALUE = "value"; 39 private String expression; 40 private PropertyChangeSupport pcs; 41 42 43 Watch (String expr) { 44 this.expression = expr; 45 pcs = new PropertyChangeSupport (this); 46 } 47 48 53 public String getExpression () { 54 return expression; 55 } 56 57 62 public void setExpression (String expression) { 63 String old = this.expression; 64 this.expression = expression; 65 pcs.firePropertyChange (PROP_EXPRESSION, old, expression); 66 } 67 68 71 public void remove () { 72 DebuggerManager dm = DebuggerManager.getDebuggerManager (); 73 dm.removeWatch (this); 74 } 75 76 81 public void addPropertyChangeListener (PropertyChangeListener l) { 82 pcs.addPropertyChangeListener (l); 83 } 84 85 90 public void removePropertyChangeListener (PropertyChangeListener l) { 91 pcs.removePropertyChangeListener (l); 92 } 93 } 94 95 | Popular Tags |