/** * Sets whether the dialog box monitors MBT Status events. When true, the dialog box registers * itself as a listener for MBT Status events and displays them as they arrive. When false, the * dialog box is not a registered listener and does not display status events. In both cases, * calls to setNote() or setProgress() continue to update the dialog. * * @param onOff true if status is monitored */ public void setStatusMonitored(final boolean onOff) { if (onOff == this.statusMonitored) { return; // No change } if (onOff == true) { Status.addStatusListener(this); } else { Status.removeStatusListener(this); } this.statusMonitored = onOff; }
/** * Hide the dialog box, removing it from the screen. If the dialog was modal, application * interaction is unblocked. */ public void hide() { super.hide(); if (this.statusMonitored) { Status.removeStatusListener(this); } }