This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 94318
Collapse All | Expand All

(-)NbSheet.java (-7 / +16 lines)
Lines 123-130 Link Here
123
            NbBundle.getBundle(NbSheet.class).getString ("ACSN_PropertiesSheet"));
123
            NbBundle.getBundle(NbSheet.class).getString ("ACSN_PropertiesSheet"));
124
        getAccessibleContext ().setAccessibleDescription (
124
        getAccessibleContext ().setAccessibleDescription (
125
            NbBundle.getBundle(NbSheet.class).getString ("ACSD_PropertiesSheet"));
125
            NbBundle.getBundle(NbSheet.class).getString ("ACSD_PropertiesSheet"));
126
127
        updateGlobalListening();
128
    }
126
    }
129
    
127
    
130
    /* Singleton accessor. As NbSheet is persistent singleton this
128
    /* Singleton accessor. As NbSheet is persistent singleton this
Lines 412-425 Link Here
412
410
413
    /** Helper, listener variable must be initialized before
411
    /** Helper, listener variable must be initialized before
414
    * calling this */
412
    * calling this */
415
    private void updateGlobalListening() {
413
    private void updateGlobalListening(boolean listen) {
416
        if (global) {
414
        if (global) {
417
            TopComponent.getRegistry().addPropertyChangeListener(
415
            if (listen) {
418
                org.openide.util.WeakListeners.propertyChange (listener, TopComponent.getRegistry ())
416
                TopComponent.getRegistry().addPropertyChangeListener(
419
            );
417
                    listener);
418
            } else {
419
                TopComponent.getRegistry().removePropertyChangeListener (listener);
420
            }
420
        }
421
        }
421
    }
422
    }
422
423
    
424
    protected void componentOpened() {
425
        updateGlobalListening (true);
426
    }
427
    
428
    protected void componentClosed() {
429
        updateGlobalListening (false);
430
    }
431
    
423
    protected void componentDeactivated() {
432
    protected void componentDeactivated() {
424
        super.componentDeactivated();
433
        super.componentDeactivated();
425
        if (Utilities.isMac()) {
434
        if (Utilities.isMac()) {

Return to bug 94318