com.bbn.openmap
Interface I18n

All Known Implementing Classes:
BasicI18n

public interface I18n

Interface for Internationalization support in Openamp. The I18n implementation will define where the resources for the given class are stored.

Intended Usage:

There are several possible uses of this interface, outlined below:

In case you were wondering, the oft used I18n abbreviation comes from the 18 characters between the 'I' and the 'n' in the word Internationalization.

See Also:
Environment, BasicI18n

Field Summary
static int MNEMONIC
          Mnemonic for a given field.
static int TEXT
          Primary type for a given field (default if types aren't applicable).
static int TITLE
          Title for components where that is appropriate.
static int TOOLTIP
          Tooltip for a given field.
 
Method Summary
 void fill(java.lang.Object requestor)
          Fill in all of the fields of the given object that are of known types (see the set(...) methods of this class) with values obtained from the appropriate ResourceBundle.
 java.lang.String get(java.lang.Class requestor, java.lang.String field, int type, java.lang.String defaultString)
          Get the string associated with the given class/field/type.
 java.lang.String get(java.lang.Class requestor, java.lang.String field, int type, java.lang.String defaultString, java.lang.Object param1)
          Method to get a parameterized String, as if by MessageFormat.
 java.lang.String get(java.lang.Class requestor, java.lang.String field, int type, java.lang.String defaultString, java.lang.Object[] params)
          Method to get a parameterized String, as if by MessageFormat.
 java.lang.String get(java.lang.Class requestor, java.lang.String field, int type, java.lang.String defaultString, java.lang.Object param1, java.lang.Object param2)
          Method to get a parameterized String, as if by MessageFormat.
 java.lang.String get(java.lang.Class requestor, java.lang.String field, java.lang.String defaultString)
          Get the string associated with the given class/field (Defaults to TEXT for the type).
 java.lang.String get(java.lang.Class requestor, java.lang.String field, java.lang.String defaultString, java.lang.Object param1)
          Method to get a parameterized String, as if by MessageFormat.
 java.lang.String get(java.lang.Class requestor, java.lang.String field, java.lang.String defaultString, java.lang.Object[] params)
          Method to get a parameterized String, as if by MessageFormat.
 java.lang.String get(java.lang.Class requestor, java.lang.String field, java.lang.String defaultString, java.lang.Object param1, java.lang.Object param2)
          Method to get a parameterized String, as if by MessageFormat.
 java.lang.String get(java.lang.Object requestor, java.lang.String field, int type, java.lang.String defaultString)
          Get the string associated with the given object/field/type.
 java.lang.String get(java.lang.Object requestor, java.lang.String field, int type, java.lang.String defaultString, java.lang.Object param1)
          Method to get a parameterized String, as if by MessageFormat.
 java.lang.String get(java.lang.Object requestor, java.lang.String field, int type, java.lang.String defaultString, java.lang.Object[] params)
          Method to get a parameterized String, as if by MessageFormat.
 java.lang.String get(java.lang.Object requestor, java.lang.String field, int type, java.lang.String defaultString, java.lang.Object param1, java.lang.Object param2)
          Method to get a parameterized String, as if by MessageFormat.
 java.lang.String get(java.lang.Object requestor, java.lang.String field, java.lang.String defaultString)
          Get the string associated with the given object/field (Defaults to TEXT for the type).
 java.lang.String get(java.lang.Object requestor, java.lang.String field, java.lang.String defaultString, java.lang.Object param1)
          Method to get a parameterized String, as if by MessageFormat.
 java.lang.String get(java.lang.Object requestor, java.lang.String field, java.lang.String defaultString, java.lang.Object[] params)
          Method to get a parameterized String, as if by MessageFormat.
 java.lang.String get(java.lang.Object requestor, java.lang.String field, java.lang.String defaultString, java.lang.Object param1, java.lang.Object param2)
          Method to get a parameterized String, as if by MessageFormat.
 void set(java.lang.Object requestor, java.lang.String field)
          Set the textual properties on a Swing component that is a member of a given class, from values in the ResourceBundle associated with that class.
 void set(java.lang.Object requestor, java.lang.String field, javax.swing.JButton comp)
          Set the textual properties from values in the appropriate ResourceBundle.
 void set(java.lang.Object requestor, java.lang.String field, javax.swing.JComponent comp)
          Set the textual properties from values in the appropriate ResourceBundle.
 void set(java.lang.Object requestor, java.lang.String field, javax.swing.JDialog comp)
          Set the textual properties from values in the appropriate ResourceBundle.
 void set(java.lang.Object requestor, java.lang.String field, javax.swing.JFrame comp)
          Set the textual properties from values in the appropriate ResourceBundle.
 void set(java.lang.Object requestor, java.lang.String field, javax.swing.JLabel comp)
          Set the textual properties from values in the appropriate ResourceBundle.
 void set(java.lang.Object requestor, java.lang.String field, javax.swing.JMenu comp)
          Set the textual properties from values in the appropriate ResourceBundle.
 void set(java.lang.Object requestor, java.lang.String field, javax.swing.JMenuItem comp)
          Set the textual properties from values in the appropriate ResourceBundle.
 

Field Detail

TEXT

static final int TEXT
Primary type for a given field (default if types aren't applicable).

See Also:
Constant Field Values

TITLE

static final int TITLE
Title for components where that is appropriate.

See Also:
Constant Field Values

TOOLTIP

static final int TOOLTIP
Tooltip for a given field.

See Also:
Constant Field Values

MNEMONIC

static final int MNEMONIC
Mnemonic for a given field.

See Also:
Constant Field Values
Method Detail

get

java.lang.String get(java.lang.Object requestor,
                     java.lang.String field,
                     java.lang.String defaultString)
Get the string associated with the given object/field (Defaults to TEXT for the type).

Parameters:
requestor - object containing the code requesting the String (typically thisfield - the field the String belongs to. Typically this will be the variable name referring to the String or the Swing object that uses the String (like a button or a label).
defaultString - what to use if the resource can't be found.

get

java.lang.String get(java.lang.Object requestor,
                     java.lang.String field,
                     int type,
                     java.lang.String defaultString)
Get the string associated with the given object/field/type.

Parameters:
requestor - object containing the code requesting the String (typically thisfield - the field the String belongs to. Typically this will be the variable name referring to the Swing object that uses the String (like a button or a label).
type - which specific slot in the Swing object the string pertains to. One of TEXT, TOOLTIP or MNEMONIC.
defaultString - what to use if the resource can't be found.

get

java.lang.String get(java.lang.Class requestor,
                     java.lang.String field,
                     java.lang.String defaultString)
Get the string associated with the given class/field (Defaults to TEXT for the type).

Parameters:
requestor - the class of the object containing the code requesting the String (typically Foo.classfield - the field the String belongs to. Typically this will be the variable name referring to the String or the Swing object that uses the String (like a button or a label).
defaultString - what to use if the resource can't be found.

get

java.lang.String get(java.lang.Class requestor,
                     java.lang.String field,
                     int type,
                     java.lang.String defaultString)
Get the string associated with the given class/field/type.

Parameters:
requestor - the classof the object containing the code requesting the String (typically Foo.classfield - the field the String belongs to. Typically this will be the variable name referring to the Swing object that uses the String (like a button or a label).
type - which specific slot in the Swing object the string pertains to. One of TEXT, TOOLTIP or MNEMONIC.
defaultString - what to use if the resource can't be found.

get

java.lang.String get(java.lang.Object requestor,
                     java.lang.String field,
                     java.lang.String defaultString,
                     java.lang.Object param1)
Method to get a parameterized String, as if by MessageFormat.

See Also:
MessageFormat

get

java.lang.String get(java.lang.Object requestor,
                     java.lang.String field,
                     int type,
                     java.lang.String defaultString,
                     java.lang.Object param1)
Method to get a parameterized String, as if by MessageFormat.

See Also:
MessageFormat

get

java.lang.String get(java.lang.Class requestor,
                     java.lang.String field,
                     java.lang.String defaultString,
                     java.lang.Object param1)
Method to get a parameterized String, as if by MessageFormat.

See Also:
MessageFormat

get

java.lang.String get(java.lang.Class requestor,
                     java.lang.String field,
                     int type,
                     java.lang.String defaultString,
                     java.lang.Object param1)
Method to get a parameterized String, as if by MessageFormat.

See Also:
MessageFormat

get

java.lang.String get(java.lang.Object requestor,
                     java.lang.String field,
                     java.lang.String defaultString,
                     java.lang.Object param1,
                     java.lang.Object param2)
Method to get a parameterized String, as if by MessageFormat.

See Also:
MessageFormat

get

java.lang.String get(java.lang.Object requestor,
                     java.lang.String field,
                     int type,
                     java.lang.String defaultString,
                     java.lang.Object param1,
                     java.lang.Object param2)
Method to get a parameterized String, as if by MessageFormat.

See Also:
MessageFormat

get

java.lang.String get(java.lang.Class requestor,
                     java.lang.String field,
                     java.lang.String defaultString,
                     java.lang.Object param1,
                     java.lang.Object param2)
Method to get a parameterized String, as if by MessageFormat.

See Also:
MessageFormat

get

java.lang.String get(java.lang.Class requestor,
                     java.lang.String field,
                     int type,
                     java.lang.String defaultString,
                     java.lang.Object param1,
                     java.lang.Object param2)
Method to get a parameterized String, as if by MessageFormat.

See Also:
MessageFormat

get

java.lang.String get(java.lang.Object requestor,
                     java.lang.String field,
                     java.lang.String defaultString,
                     java.lang.Object[] params)
Method to get a parameterized String, as if by MessageFormat.

See Also:
MessageFormat

get

java.lang.String get(java.lang.Object requestor,
                     java.lang.String field,
                     int type,
                     java.lang.String defaultString,
                     java.lang.Object[] params)
Method to get a parameterized String, as if by MessageFormat.

See Also:
MessageFormat

get

java.lang.String get(java.lang.Class requestor,
                     java.lang.String field,
                     java.lang.String defaultString,
                     java.lang.Object[] params)
Method to get a parameterized String, as if by MessageFormat.

See Also:
MessageFormat

get

java.lang.String get(java.lang.Class requestor,
                     java.lang.String field,
                     int type,
                     java.lang.String defaultString,
                     java.lang.Object[] params)
Method to get a parameterized String, as if by MessageFormat.

See Also:
MessageFormat

set

void set(java.lang.Object requestor,
         java.lang.String field,
         javax.swing.JLabel comp)
Set the textual properties from values in the appropriate ResourceBundle.

Parameters:
requestor - object containing the code requesting the String (typically thisfield - the field the String belongs to. Typically this will be the variable name referring to the comp parameter.
comp - the component whose properties are being set.
Throws:
MissingResourceException - if the data can't be found.

set

void set(java.lang.Object requestor,
         java.lang.String field,
         javax.swing.JButton comp)
Set the textual properties from values in the appropriate ResourceBundle.

Parameters:
requestor - object containing the code requesting the String (typically thisfield - the field the String belongs to. Typically this will be the variable name referring to the comp parameter.
comp - the component whose properties are being set.
Throws:
MissingResourceException - if the data can't be found.

set

void set(java.lang.Object requestor,
         java.lang.String field,
         javax.swing.JMenu comp)
Set the textual properties from values in the appropriate ResourceBundle.

Parameters:
requestor - object containing the code requesting the String (typically thisfield - the field the String belongs to. Typically this will be the variable name referring to the comp parameter.
comp - the component whose properties are being set.
Throws:
MissingResourceException - if the data can't be found.

set

void set(java.lang.Object requestor,
         java.lang.String field,
         javax.swing.JMenuItem comp)
Set the textual properties from values in the appropriate ResourceBundle.

Parameters:
requestor - object containing the code requesting the String (typically thisfield - the field the String belongs to. Typically this will be the variable name referring to the comp parameter.
comp - the component whose properties are being set.
Throws:
MissingResourceException - if the data can't be found.

set

void set(java.lang.Object requestor,
         java.lang.String field,
         javax.swing.JDialog comp)
Set the textual properties from values in the appropriate ResourceBundle.

Parameters:
requestor - object containing the code requesting the String (typically thisfield - the field the String belongs to. Typically this will be the variable name referring to the comp parameter.
comp - the component whose properties are being set.
Throws:
MissingResourceException - if the data can't be found.

set

void set(java.lang.Object requestor,
         java.lang.String field,
         javax.swing.JFrame comp)
Set the textual properties from values in the appropriate ResourceBundle.

Parameters:
requestor - object containing the code requesting the String (typically thisfield - the field the String belongs to. Typically this will be the variable name referring to the comp parameter.
comp - the component whose properties are being set.
Throws:
MissingResourceException - if the data can't be found.

set

void set(java.lang.Object requestor,
         java.lang.String field,
         javax.swing.JComponent comp)
Set the textual properties from values in the appropriate ResourceBundle.

Note: This method just looks for a TitledBorder on the component.

Parameters:
requestor - object containing the code requesting the String (typically thisfield - the field the String belongs to. Typically this will be the variable name referring to the comp parameter.
comp - the component whose properties are being set.
Throws:
MissingResourceException - if the data can't be found.

set

void set(java.lang.Object requestor,
         java.lang.String field)
Set the textual properties on a Swing component that is a member of a given class, from values in the ResourceBundle associated with that class. Note that the field must contain an object of a known type (see the other set(...) methods of this class).

The setting of the values of this field will be accomplished by calling the appropriate set(...) method on this class.

Parameters:
requestor - object containing the code requesting the Component setup (typically thisfield - the variable name of the component being setup.
Throws:
MissingResourceException - if the data can't be found.

fill

void fill(java.lang.Object requestor)
Fill in all of the fields of the given object that are of known types (see the set(...) methods of this class) with values obtained from the appropriate ResourceBundle.

The setting of the values of this field will be accomplished by calling the appropriate set(...) method on this class.



Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details