站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

LocaleSupport (Editor Library) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.editor.lib/1 1.14.0 3

org.netbeans.editor
Class LocaleSupport

java.lang.Object
  extended by org.netbeans.editor.LocaleSupport

Deprecated. this class is deprecated as the number of bundle queries is proportional to the number of registered localizers which is not optimal from the performance point of view. The queries through this class should be replaced by queries to individual bundles.

public class LocaleSupport
extends Object

All the strings that should be localized will go through this place. Multiple custom localizers can be registered.


Nested Class Summary
static interface LocaleSupport.Localizer
          Deprecated. Translates the keys to the localized strings.
 
Constructor Summary
LocaleSupport()
          Deprecated.  
 
Method Summary
static void addLocalizer(LocaleSupport.Localizer localizer)
          Deprecated. Add a new localizer to the localizer array.
static char getChar(String key, char defaultValue)
          Deprecated. Get the localized character or the default value if no translation for the given key exists.
static String getString(String key)
          Deprecated. Get the localized string for the given key using the registered localizers.
static String getString(String key, String defaultValue)
          Deprecated. Get the localized string or the default value if no translation for the given key exists.
static void removeLocalizer(LocaleSupport.Localizer localizer)
          Deprecated. Remove the existing localizer from the localizer array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocaleSupport

public LocaleSupport()
Deprecated. 
Method Detail

addLocalizer

public static void addLocalizer(LocaleSupport.Localizer localizer)
Deprecated. 
Add a new localizer to the localizer array. The array of localizers is tracked from the lastly added localizer to the firstly added one until the translation for the given key is found.

Parameters:
localizer - localizer to add to the localizer array.

removeLocalizer

public static void removeLocalizer(LocaleSupport.Localizer localizer)
Deprecated. 
Remove the existing localizer from the localizer array.

Parameters:
localizer - localizer to remove.

getString

public static String getString(String key)
Deprecated. 
Get the localized string for the given key using the registered localizers.

Parameters:
key - key to translate to localized string.
Returns:
localized string or null if there's no localization.

getString

public static String getString(String key,
                               String defaultValue)
Deprecated. 
Get the localized string or the default value if no translation for the given key exists.

Parameters:
key - key to translate to localized string.
defaultValue - default value to be returned in case no localized string is found for the given key.

getChar

public static char getChar(String key,
                           char defaultValue)
Deprecated. 
Get the localized character or the default value if no translation for the given key exists. This method is mainly usable for getting localized mnemonics.

Parameters:
key - key to translate to localized character.
defaultValue - default value to be returned in case no localized character is found for the given key.

org.netbeans.modules.editor.lib/1 1.14.0 3

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.