コード例 #1
0
  private boolean _loadResourceBundle() {
    String f_strMethod = "_loadResourceBundle()";

    /* MEMO: trim() not necessary
     */
    try {
      String strValue = null;

      // TEXTS
      strValue = _s_rbeResources.getString("text_this");
      setText(strValue);
      strValue = _s_rbeResources.getString("text_left");
      this._mimLeft.setText(strValue);
      strValue = _s_rbeResources.getString("text_center");
      this._mimCenter.setText(strValue);
      strValue = _s_rbeResources.getString("text_right");
      this._mimRight.setText(strValue);
    } catch (java.util.MissingResourceException excMissingResource) {
      excMissingResource.printStackTrace();
      MySystem.s_printOutError(
          this, f_strMethod, "excMissingResource caught," + _f_s_strBundleFileLong);
      return false;
    }

    return true;
  }
コード例 #2
0
  static {
    final String f_strWhere =
        "com.google.code.p.keytooliui.shared.swing.menu.METextAlignmentEditorText";

    try {
      _s_rbeResources =
          java.util.ResourceBundle.getBundle(
              _f_s_strBundleFileShort, java.util.Locale.getDefault());
    } catch (java.util.MissingResourceException excMissingResource) {
      excMissingResource.printStackTrace();
      MySystem.s_printOutExit(f_strWhere, _f_s_strBundleFileLong + "excMissingResource caught");
    }
  }