Пример #1
0
  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);
  }
Пример #2
0
  public RedoMenuItem() {

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

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

    init();
  }
Пример #3
0
  public SpacingLabel() {

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

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

    init();
  }
Пример #4
0
  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();
  }
Пример #7
0
  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));
  }