private void localize() {

    LocaleManager localeManager = LocaleManager.getInstance();

    setText(localeManager.getValue(CAPTION_LOCALIZE_KEY));

    String tooltip = localeManager.getValue(TOOLTIP_LOCALIZE_KEY);
    setToolTipText(tooltip != null && tooltip.length() > 0 ? tooltip : null);
  }
  public RedoMenuItem() {

    Manager manager = Manager.getInstance();
    manager.registerRedoMenuItem(this);

    LocaleManager localeManager = LocaleManager.getInstance();
    localeManager.addLocaleChangeListener(this);

    init();
  }
  public SpacingLabel() {

    Manager manager = Manager.getInstance();
    manager.registerSpacingLabel(this);

    LocaleManager localeManager = LocaleManager.getInstance();
    localeManager.addLocaleChangeListener(this);

    init();
  }
  public PluginsOKButton() {

    Manager manager = Manager.getInstance();
    manager.registerPluginsOKButton(this);

    LocaleManager localeManager = LocaleManager.getInstance();
    localeManager.addLocaleChangeListener(this);

    init();
  }
  private void init() {

    setEnabled(true);

    LocaleManager localeManager = LocaleManager.getInstance();
    setSelected(locale == localeManager.getLocale());

    localize();

    addActionListener(this);
  }
  public LanguageRadioButtonMenuItem(Locale locale) {

    this.locale = locale;

    LocaleManager localeManager = LocaleManager.getInstance();
    localeManager.addLocaleChangeListener(this);

    // register here

    init();
  }
  private void localize() {

    LocaleManager localeManager = LocaleManager.getInstance();
    UndoManager undoManager = UndoManager.getInstance();

    UndoableEdit undoableEdit = undoManager.editToBeRedone();

    if (undoableEdit == null) {
      setText(localeManager.getValue(CAPTION_LOCALIZE_KEY));
    } else {
      setText(undoableEdit.getRedoPresentationName());
    }
  }
  private void localize() {

    LocaleManager localeManager = LocaleManager.getInstance();
    setText(localeManager.getValue(CAPTION_LOCALIZE_KEY));
  }
  private void localize() {

    LocaleManager localeManager = LocaleManager.getInstance();
    setText(localeManager.getLanguageValue(locale));
  }