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

(-)openide.dialogs/src/org/openide/WizardDescriptor.java (+39 lines)
 Lines 560-565    Link Here 
560
    public void setClosingOptions(Object[] options) {
560
    public void setClosingOptions(Object[] options) {
561
        super.setClosingOptions(convertOptions(options));
561
        super.setClosingOptions(convertOptions(options));
562
    }
562
    }
563
    
564
    /**
565
     * Setter for the button texts of this <code>WizardDescriptor</code> instance. Currently supported options are:<br/>
566
     *
567
     * <ul>
568
     *   <li>{@link #FINISH_OPTION}</li>
569
     *   <li>{@link #CANCEL_OPTION}</li>
570
     *   <li>{@link #PREVIOUS_OPTION}</li>
571
     *   <li>{@link #NEXT_OPTION}</li>
572
     * </ul>
573
     * <br/>
574
     * <br/>
575
     * 
576
     * For more info on the possible options regarding the new text see
577
     * {@link Mnemonics#setLocalizedText(javax.swing.AbstractButton, java.lang.String) }.
578
     *
579
     * @param   option  the button type whose text shall be set
580
     * @param   text    the text for the button
581
     *
582
     * @throws  IllegalArgumentException  if the provided option is not supported
583
     *
584
     * @see     Mnemonics#setLocalizedText(javax.swing.AbstractButton, java.lang.String)
585
     */
586
    public void setButtonText(final Object option, final String text){
587
        final AbstractButton button;
588
        if (WizardDescriptor.FINISH_OPTION.equals(option)) {
589
            button = finishButton;
590
        } else if (WizardDescriptor.CANCEL_OPTION.equals(option)) {
591
            button = cancelButton;
592
        } else if (WizardDescriptor.PREVIOUS_OPTION.equals(option)) {
593
            button = previousButton;
594
        } else if (WizardDescriptor.NEXT_OPTION.equals(option)) {
595
            button = nextButton;
596
        } else {
597
            throw new IllegalArgumentException("unsupported option: " + option); // NOI18N
598
        }
599
600
        Mnemonics.setLocalizedText(button, text);
601
    }
563
602
564
    /** Converts some options.
603
    /** Converts some options.
565
    */
604
    */

Return to bug 229765
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo