/**
* Label that can update itself from {@link I18n}.
/**
* Label that can update itself from {@link I18n}.
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
* @version $Id$
*/
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
* @version $Id$
*/
/**
* Creates a new label with the given I18n basename.
/**
* Creates a new label with the given I18n basename.
* @param i18nBasename
* The I18n basename of the label
*/
* @param i18nBasename
* The I18n basename of the label
*/
/**
* Creates a new label with the given I18n basename that optionally is a
* label for the given component.
/**
* Creates a new label with the given I18n basename that optionally is a
* label for the given component.
* @param i18nBasename
* The I18n basename of the label
* @param component
* @param i18nBasename
* The I18n basename of the label
* @param component
/**
* Creates a new label with the given I18n basename that optionally is a
* label for the given component.
/**
* Creates a new label with the given I18n basename that optionally is a
* label for the given component.
* @param i18nBasename
* The I18n basename of the label
* @param arguments
* @param i18nBasename
* The I18n basename of the label
* @param arguments
/**
* Creates a new label with the given I18n basename that optionally is a
* label for the given component.
/**
* Creates a new label with the given I18n basename that optionally is a
* label for the given component.
* @param i18nBasename
* The I18n basename of the label
* @param component
* @param i18nBasename
* The I18n basename of the label
* @param component
super();
this.i18nBasename = i18nBasename;
this.arguments = arguments;
super();
this.i18nBasename = i18nBasename;
this.arguments = arguments;
if (component != null) {
setLabelFor(component);
}
if (component != null) {
setLabelFor(component);
}
*/
public void updateI18n() {
setText(I18n.get(i18nBasename + ".name", arguments));
*/
public void updateI18n() {
setText(I18n.get(i18nBasename + ".name", arguments));
- setDisplayedMnemonic(I18n.getKey(i18nBasename + ".mnemonic"));
+ if (getLabelFor() != null) {
+ setDisplayedMnemonic(I18n.getKey(i18nBasename + ".mnemonic"));
+ }