/** * Enable/disable firing of updates. As a side effect, it unregisters model event listeners during * disable and registers them again during enable. * * @param f new firing state. Pass false to disable updates. */ final synchronized void setFiring(boolean f) { ModelEventPump eventPump = Model.getPump(); if (f && target != null) { eventPump.addModelEventListener(this, target, eventName); } else { eventPump.removeModelEventListener(this, target, eventName); } firing = f; }
/** * Sets the target. * * @param target The target to set */ public final void setTarget(Object target) { ModelEventPump eventPump = Model.getPump(); this.target = target; eventPump.addModelEventListener(this, this.target, getEventName()); updateText(getProperty()); }