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 |
*/ |