au.edu.swin.synergy.plugin.dialect
Class BString
java.lang.Object
|
+--au.edu.swin.synergy.plugin.dialect.BString
- public class BString
- extends Object
The BString
is a locale sensitive version of the normal
Java String
. By using this instead of the normal String,
changes to the Locale can be automatically retrieved from their
appropriate places depending on the Locale without the source
of the String having to do anything.
- Author:
- Tristan Austin
Constructor Summary |
BString(Object source,
String key)
This will create a new BString object that represents the string
indicated by the key paramater in the screentext<>.properties file
in the package directory of the source object. |
BString(Object source,
String key,
Object[] compoundArgs)
This will create a new BString object that represents the string
indicated by the key paramater in the screentext<>.properties file
in the package directory of the source object. |
BString(String key)
This will create a new BString object that represents the string
indicated by the key paramater in the globaltext<>.properties file
in the package directory of the BDialect class. |
Method Summary |
String |
toString()
This version of toString() will get the value from
the BDialect class in order to ensure that it is correct
for the current locale no matter where it is called from. |
BString
public BString(String key)
- This will create a new BString object that represents the string
indicated by the key paramater in the globaltext<>.properties file
in the package directory of the BDialect class.
- Parameters:
key
- The key to be used for the string in the appropriate location
BString
public BString(Object source,
String key)
- This will create a new BString object that represents the string
indicated by the key paramater in the screentext<>.properties file
in the package directory of the source object. If the key is not found
in the screentext<>.properties file, the globaltext<>.properties file
will be searched.
- Parameters:
source
- The object who's package indicates the location of the resource filekey
- The key to be used for the string in the appropriate location
BString
public BString(Object source,
String key,
Object[] compoundArgs)
- This will create a new BString object that represents the string
indicated by the key paramater in the screentext<>.properties file
in the package directory of the source object. If the key is not found
in the screentext<>.properties file, the globaltext<>.properties file
will be searched.
This version allows the user to specify a compound message providing the
arguments for the message. This allows the same message to be adjusted
correctly for different Locales
- Parameters:
source
- The object who's package indicates the location of the resource filekey
- The key to be used for the string in the appropriate location
toString
public String toString()
- This version of toString() will get the value from
the BDialect class in order to ensure that it is correct
for the current locale no matter where it is called from.
- Returns:
- The value of this string in respect to the current Locale
- Overrides:
- toString in class Object