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 35266
Collapse All | Expand All

(-)src/org/openide/NotifyDescriptor.java (-2 / +10 lines)
Lines 432-440 Link Here
432
        }
432
        }
433
        return null;
433
        return null;
434
    }
434
    }
435
    
436
    /**
437
     * Sets the value w/o firing property change. The caller this is responsible 
438
     * to notify this change.
439
     */
440
    void _setValue (Object newValue) {
441
        value = newValue;
442
    }
435
443
436
    /**
444
    /**
437
    * Set the value the user has chosen.
445
    * Set the value the user has chosen and fires appropriate property change.
438
    * You probably do not want to call this yourself, of course.
446
    * You probably do not want to call this yourself, of course.
439
    *
447
    *
440
    * @param newValue the chosen value
448
    * @param newValue the chosen value
Lines 443-449 Link Here
443
    */
451
    */
444
    public void setValue(Object newValue) {
452
    public void setValue(Object newValue) {
445
        Object oldValue = value;
453
        Object oldValue = value;
446
        value = newValue;
454
        _setValue (newValue);
447
        firePropertyChange(PROP_VALUE, oldValue, newValue);
455
        firePropertyChange(PROP_VALUE, oldValue, newValue);
448
    }
456
    }
449
457
(-)src/org/openide/WizardDescriptor.java (-3 / +14 lines)
Lines 499-504 Link Here
499
        //    nextButton.setVisible (next);
499
        //    nextButton.setVisible (next);
500
        //    finishButton.setVisible (!next || (current instanceof FinishPanel));
500
        //    finishButton.setVisible (!next || (current instanceof FinishPanel));
501
501
502
        // ??? Why set value to NEXT_OPTION?
502
        if (next) {
503
        if (next) {
503
            setValue (nextButton);
504
            setValue (nextButton);
504
        } else {
505
        } else {
Lines 800-809 Link Here
800
        //Bugfix #25820: Call resetWizard to make sure that storeSettings
801
        //Bugfix #25820: Call resetWizard to make sure that storeSettings
801
        //is called before propertyChange.
802
        //is called before propertyChange.
802
        Object convertedValue = backConvertOption(value);
803
        Object convertedValue = backConvertOption(value);
804
        
805
        // set new value w/o fire PROP_VALUE change
806
        Object oldValue = getValue ();
807
        _setValue (convertedValue);
808
        
803
        if (convertedValue == OK_OPTION) {
809
        if (convertedValue == OK_OPTION) {
804
            resetWizard();
810
            resetWizard();
805
        }
811
        }
806
        super.setValue(backConvertOption(value));
812
        // notify listeners about PROP_VALUE change
813
        firePropertyChange (PROP_VALUE, oldValue, convertedValue);
807
        
814
        
808
        // #17360: Reset wizard on CLOSED_OPTION too.
815
        // #17360: Reset wizard on CLOSED_OPTION too.
809
        if(value == CLOSED_OPTION) {
816
        if(value == CLOSED_OPTION) {
Lines 1136-1152 Link Here
1136
            }
1143
            }
1137
1144
1138
            if (ev.getSource () == finishButton) {
1145
            if (ev.getSource () == finishButton) {
1146
                Object oldValue = getValue ();
1147
                _setValue (OK_OPTION);
1139
                if (Arrays.asList(getClosingOptions()).contains(finishButton)) {
1148
                if (Arrays.asList(getClosingOptions()).contains(finishButton)) {
1140
                    resetWizard();
1149
                    resetWizard();
1141
                }
1150
                }
1142
                setValue (OK_OPTION);
1151
                firePropertyChange (PROP_VALUE, oldValue, OK_OPTION);
1143
            }
1152
            }
1144
1153
1145
            if (ev.getSource () == cancelButton) {
1154
            if (ev.getSource () == cancelButton) {
1155
                Object oldValue = getValue ();
1156
                _setValue (CANCEL_OPTION);
1146
                if (Arrays.asList(getClosingOptions()).contains(cancelButton)) {
1157
                if (Arrays.asList(getClosingOptions()).contains(cancelButton)) {
1147
                    resetWizard();
1158
                    resetWizard();
1148
                }
1159
                }
1149
                setValue (CANCEL_OPTION);
1160
                firePropertyChange (PROP_VALUE, oldValue, CANCEL_OPTION);
1150
            }
1161
            }
1151
        }
1162
        }
1152
    }
1163
    }

Return to bug 35266