/** * Returns the formal string representation for this key. * * @return The formal string representation for this key. Guaranteed not to * be <code>null</code>. */ @Override public final String toString() { final IKeyLookup lookup = KeyLookupFactory.getDefault(); return lookup.formalNameLookup(key); } }
@Override public String format(final int key) { final IKeyLookup lookup = KeyLookupFactory.getDefault(); return lookup.formalNameLookup(key); }
public String format(final int key) { final IKeyLookup lookup = KeyLookupFactory.getDefault(); return lookup.formalNameLookup(key); }
@Override public String format(final int key) { final IKeyLookup lookup = KeyLookupFactory.getDefault(); return lookup.formalNameLookup(key); }
@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; }
@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; }
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; }
/** * Formats an individual key into a human readable format. This uses an * internationalization resource bundle to look up the key. This does the * platform-specific formatting for Carbon. * * @param key * The key to format. * @return The key formatted as a string; should not be <code>null</code>. */ public final String format(final int key) { final IKeyLookup lookup = KeyLookupFactory.getDefault(); final String name = lookup.formalNameLookup(key); // TODO consider platform-specific resource bundles if (Util.isMac()) { String formattedName = (String) CARBON_KEY_LOOK_UP.get(name); if (formattedName != null) { return formattedName; } } return super.format(key); }
/** * Formats an individual key into a human readable format. This uses an * internationalization resource bundle to look up the key. This does the * platform-specific formatting for Carbon. * * @param key * The key to format. * @return The key formatted as a string; should not be <code>null</code>. */ @Override public final String format(final int key) { final IKeyLookup lookup = KeyLookupFactory.getDefault(); final String name = lookup.formalNameLookup(key); // TODO consider platform-specific resource bundles if (Util.isMac()) { String formattedName = CARBON_KEY_LOOK_UP.get(name); if (formattedName != null) { return formattedName; } } return super.format(key); }
/** * Formats an individual key into a human readable format. This uses an * internationalization resource bundle to look up the key. This does the * platform-specific formatting for Carbon. * * @param key * The key to format. * @return The key formatted as a string; should not be <code>null</code>. */ @Override public final String format(final int key) { final IKeyLookup lookup = KeyLookupFactory.getDefault(); final String name = lookup.formalNameLookup(key); // TODO consider platform-specific resource bundles if (Util.isMac()) { String formattedName = (String) CARBON_KEY_LOOK_UP.get(name); if (formattedName != null) { return formattedName; } } return super.format(key); }
/** * 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(); }
/** * 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(); }
/** * 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(); }