JClass 4.5.0 API
Documentation

com.klg.jclass.util.legend
Class JCLegendBundle

java.lang.Object
  |
  +--com.klg.jclass.util.legend.JCLegendBundle

public class JCLegendBundle
extends Object

JCLegendBundle contains locale-specific objects and helpers to get this information. When a program needs a locale-specific string it can load it from the resource bundle that is appropriate for the current user's locale. Those are located in the com.klg.jclass.util.legend\resources directory. In this way, it can be written program code that is largely independent of the user's locale isolating most of the locale-specific information in resource bundles. This class it is used either in JDK 102 or JDK 111 for loading strings in JCLegend.


Field Summary
static String key1
           
static String key10
           
static String key2
           
static String key3
           
static String key4
           
static String key5
           
static String key6
           
static String key7
           
static String key8
           
static String key9
           
 
Constructor Summary
JCLegendBundle()
           
 
Method Summary
static void setBundleLocale(Locale l)
          Static function used to programatically change the default locale
static String string(String key)
          Static function used to retrive a string based on its key; In JDK 1.1 the default locale it is used.
static String string(String key, MessageFormat formatter, Object[] args)
          Static function used to format a string based on its key.
static String string(String key, Object[] args)
          Static function used to format a string based on its key.
static String string(String key, Object[] args, double[] limits, String[] formats, int choiceVar)
          Static function used to format a string based on its key.
static String string(String language, String country, String key)
          Static function used to localize a string based on its key, language and country
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key1

public static final String key1

key2

public static final String key2

key3

public static final String key3

key4

public static final String key4

key5

public static final String key5

key6

public static final String key6

key7

public static final String key7

key8

public static final String key8

key9

public static final String key9

key10

public static final String key10
Constructor Detail

JCLegendBundle

public JCLegendBundle()
Method Detail

string

public static String string(String language,
                            String country,
                            String key)
Static function used to localize a string based on its key, language and country
Parameters:
language - desired language
country - desired country
key - the key of the string that is to be retrived

string

public static String string(String key)
Static function used to retrive a string based on its key; In JDK 1.1 the default locale it is used.
Parameters:
key - the key of the string that is to be retrived

string

public static String string(String key,
                            Object[] args)
Static function used to format a string based on its key. It produces concatenated messages in la anguage-neutral way.
Parameters:
key - the key of the string that is to be retrived
args - set of objects used in formatting

string

public static String string(String key,
                            MessageFormat formatter,
                            Object[] args)
Static function used to format a string based on its key. It produces concatenated messages in la anguage-neutral way.
Parameters:
key - the key of the string that is to be retrived
formatter - a formatter provided by the user
args - set of objects used in formatting

setBundleLocale

public static void setBundleLocale(Locale l)
Static function used to programatically change the default locale
Parameters:
lnew - locale

string

public static String string(String key,
                            Object[] args,
                            double[] limits,
                            String[] formats,
                            int choiceVar)
Static function used to format a string based on its key. It produces concatenated messages in laanguage-neutral way. Allows to attach a format to a range of numbers. It is generally used for handling plurals The choice is specified with an ascending list of doubles, where each item specifies a half-open interval up to the next item: X matches j if and only if limit[j] <= X < limit[j+1]
Parameters:
key - the key of the string that is to be retrived
args - set of objects used in formatting
limits - the list of doubles that specifies a half-open interval
formats - it is an array of choices: one choice for each interval defined by the limits array
choiceVar - it is used to identify which of the variable from the string that contains the formatting information uses the choice formatting feature. Note the limitation of only one choice variable per string.

Copyright© 1999-2000 KL Group Inc.
All rights reserved.