org.eclipse.jface.util.Util.translateString()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(7.1k)|赞(0)|评价(0)|浏览(154)

本文整理了Java中org.eclipse.jface.util.Util.translateString()方法的一些代码示例,展示了Util.translateString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.translateString()方法的具体详情如下:
包路径:org.eclipse.jface.util.Util
类名称:Util
方法名:translateString

Util.translateString介绍

[英]Provides a translation of a particular key from the resource bundle.
[中]提供资源包中特定密钥的转换。

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

@Override
protected String getKeyDelimiter() {
  return Util.translateString(RESOURCE_BUNDLE, KEY_DELIMITER_KEY,
      KeyStroke.KEY_DELIMITER);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

@Override
protected String getKeyDelimiter() {
  return Util.translateString(RESOURCE_BUNDLE, KEY_DELIMITER_KEY,
      KeyStroke.KEY_DELIMITER);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

@Override
protected String getKeyStrokeDelimiter() {
  return Util.translateString(RESOURCE_BUNDLE, KEY_STROKE_DELIMITER_KEY,
      KeySequence.KEY_STROKE_DELIMITER);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

@Override
protected String getKeyStrokeDelimiter() {
  return Util.translateString(RESOURCE_BUNDLE, KEY_STROKE_DELIMITER_KEY,
      KeySequence.KEY_STROKE_DELIMITER);
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

protected String getKeyDelimiter() {
  return Util.translateString(RESOURCE_BUNDLE, KEY_DELIMITER_KEY,
      KeyStroke.KEY_DELIMITER);
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

protected String getKeyStrokeDelimiter() {
  return Util.translateString(RESOURCE_BUNDLE, KEY_STROKE_DELIMITER_KEY,
      KeySequence.KEY_STROKE_DELIMITER);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

@Override
protected String getKeyStrokeDelimiter() {
  // We must do the look up every time, as our locale might change.
  if (Util.isWindows()) {
    return Util.translateString(RESOURCE_BUNDLE,
        WIN32_KEY_STROKE_DELIMITER_KEY,
        KeySequence.KEY_STROKE_DELIMITER);
  }
  return Util.translateString(RESOURCE_BUNDLE, KEY_STROKE_DELIMITER_KEY,
      KeySequence.KEY_STROKE_DELIMITER);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

@Override
protected String getKeyDelimiter() {
  // We must do the look up every time, as our locale might change.
  if (Util.isMac()) {
    return Util.translateString(RESOURCE_BUNDLE,
        CARBON_KEY_DELIMITER_KEY, Util.ZERO_LENGTH_STRING);
  }
  return Util.translateString(RESOURCE_BUNDLE, KEY_DELIMITER_KEY,
      KeyStroke.KEY_DELIMITER);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

@Override
protected String getKeyStrokeDelimiter() {
  // We must do the look up every time, as our locale might change.
  if (Util.isWindows()) {
    return Util.translateString(RESOURCE_BUNDLE,
        WIN32_KEY_STROKE_DELIMITER_KEY,
        KeySequence.KEY_STROKE_DELIMITER);
  }
  return Util.translateString(RESOURCE_BUNDLE, KEY_STROKE_DELIMITER_KEY,
      KeySequence.KEY_STROKE_DELIMITER);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

@Override
protected String getKeyDelimiter() {
  // We must do the look up every time, as our locale might change.
  if (Util.isMac()) {
    return Util.translateString(RESOURCE_BUNDLE,
        CARBON_KEY_DELIMITER_KEY, Util.ZERO_LENGTH_STRING);
  }
  return Util.translateString(RESOURCE_BUNDLE, KEY_DELIMITER_KEY,
      KeyStroke.KEY_DELIMITER);
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

protected String getKeyDelimiter() {
    // We must do the look up every time, as our locale might change.
    if (Util.isMac()) {
//            return Util.translateString(RESOURCE_BUNDLE,
      return Util.translateString(getResourceBundle( NativeKeyFormatter.class ),
          CARBON_KEY_DELIMITER_KEY, Util.ZERO_LENGTH_STRING);
    }

//        return Util.translateString(RESOURCE_BUNDLE,
    return Util.translateString(getResourceBundle( NativeKeyFormatter.class ), 
        KEY_DELIMITER_KEY, KeyStroke.KEY_DELIMITER);
  }

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

protected String getKeyStrokeDelimiter() {
    // We must do the look up every time, as our locale might change.
    if (Util.isWindows()) {
//            return Util.translateString(RESOURCE_BUNDLE,
      return Util.translateString(getResourceBundle( NativeKeyFormatter.class ),
          WIN32_KEY_STROKE_DELIMITER_KEY, KeySequence.KEY_STROKE_DELIMITER);
    }

//        return Util.translateString(RESOURCE_BUNDLE,
    return Util.translateString(getResourceBundle( NativeKeyFormatter.class ), 
        KEY_STROKE_DELIMITER_KEY, KeySequence.KEY_STROKE_DELIMITER);
  }

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

@Override
public String format(final int key) {
  final IKeyLookup lookup = KeyLookupFactory.getDefault();
  final String name = lookup.formalNameLookup(key);
  if (resourceBundleKeys.contains(name)) {
    return Util.translateString(RESOURCE_BUNDLE, name, name);
  }
  return name;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

@Override
public String format(final int key) {
  final IKeyLookup lookup = KeyLookupFactory.getDefault();
  final String name = lookup.formalNameLookup(key);
  if (resourceBundleKeys.contains(name)) {
    return Util.translateString(RESOURCE_BUNDLE, name, name);
  }
  return name;
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

public String format(final int key) {
    final IKeyLookup lookup = KeyLookupFactory.getDefault();
    final String name = lookup.formalNameLookup(key);

    if (resourceBundleKeys.contains(name)) {
//            return Util.translateString(RESOURCE_BUNDLE, name, name);
      return Util.translateString(getResourceBundle(AbstractKeyFormatter.class), name, name);
    }
    
    return name;
  }

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

/**
 * Formats an individual key into a human readable format. This converts the
 * key into a format similar to Xemacs.
 * 
 * @param key
 *            The key to format; must not be <code>null</code>.
 * @return The key formatted as a string; should not be <code>null</code>.
 */
public String format(final int key) {
  final IKeyLookup lookup = KeyLookupFactory.getDefault();
  if (lookup.isModifierKey(key)) {
    String formattedName = Util.translateString(RESOURCE_BUNDLE, lookup
        .formalNameLookup(key), null);
    if (formattedName != null) {
      return formattedName;
    }
  }
  return super.format(key).toLowerCase();
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

/**
 * Formats an individual key into a human readable format. This converts the
 * key into a format similar to Xemacs.
 *
 * @param key
 *            The key to format; must not be <code>null</code>.
 * @return The key formatted as a string; should not be <code>null</code>.
 */
@Override
public String format(final int key) {
  final IKeyLookup lookup = KeyLookupFactory.getDefault();
  if (lookup.isModifierKey(key)) {
    String formattedName = Util.translateString(RESOURCE_BUNDLE, lookup
        .formalNameLookup(key), null);
    if (formattedName != null) {
      return formattedName;
    }
  }
  return super.format(key).toLowerCase();
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

/**
 * Formats an individual key into a human readable format. This converts the
 * key into a format similar to Xemacs.
 *
 * @param key
 *            The key to format; must not be <code>null</code>.
 * @return The key formatted as a string; should not be <code>null</code>.
 */
@Override
public String format(final int key) {
  final IKeyLookup lookup = KeyLookupFactory.getDefault();
  if (lookup.isModifierKey(key)) {
    String formattedName = Util.translateString(RESOURCE_BUNDLE, lookup
        .formalNameLookup(key), null);
    if (formattedName != null) {
      return formattedName;
    }
  }
  return super.format(key).toLowerCase();
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

.translateString(RESOURCE_BUNDLE,
    "undefinedCommand.WarningMessage", null), //$NON-NLS-1$
command.getId());

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

.translateString(RESOURCE_BUNDLE,
    "undefinedCommand.WarningMessage", null), //$NON-NLS-1$
command.getId());

相关文章