Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.share.nls
Class MutableLocaleContext

java.lang.Object
  |
  +--oracle.cabo.share.nls.LocaleContext
        |
        +--oracle.cabo.share.nls.MutableLocaleContext

public final class MutableLocaleContext
extends LocaleContext

Context for locale-specific operations and properties. All of the properties should initially default to those of the base Locale, while allowing the locale-specific properties to be overridden.

It is expected that additional properties will be added to this class over time in order to support overriding the date and number formats.

Setting the DateFormatContext clones the parameter and wraps it in an ImmutableDateFormatContext if necessary. This will then be returned by getDateFormatContext. Clients are therefore guaranteed that this property can not be modified after it is set on the LocaleContext, without a subsequent call to setDateFormatContext.


Constructor Summary
MutableLocaleContext()
          Creates a MutableLocaleContext based off of the default Locale.
MutableLocaleContext(java.util.Locale baseLocale)
          Creates a MutableLocaleContext based off of the specified Locale.
MutableLocaleContext(LocaleContext context)
          Creates a MutableLocaleContext based on a pre-existing LocaleContext.
MutableLocaleContext(java.util.Locale baseLocale, java.util.Locale translationLocale)
          Creates a MutableLocaleContext based off of the specified Locale and using a different Locale for translations.
 
Method Summary
protected  DateFormatContext getDateFormatContextImpl()
          Returns the DateFormatContext containing all date format parameters.
protected  DecimalFormatContext getDecimalFormatContextImpl()
          Returns the DecimalFormatContext containing all number format parameters.
 void setDateFormatContext(DateFormatContext dateFormatContext)
          Sets the DateFormatContext containing all date format parameters.
protected  void setDateFormatContextImpl(DateFormatContext dateFormatContext)
          Sets the DateFormatContext containing all date format parameters.
 void setDecimalFormatContext(DecimalFormatContext decimalFormatContext)
          Sets the DecimalFormatContext containing all number format parameters.
protected  void setDecimalFormatContextImpl(DecimalFormatContext decimalFormatContext)
          Sets the DecimalFormatContext containing all number format parameters.
 void setReadingDirection(int newReadingDirection)
          Sets the new reading direction to be one of the reading directions defined in oracle.bali.share.nls.LocaleUtils.
 void setTimeZone(java.util.TimeZone newTimeZone)
          Sets the TimeZone that the user is running in.
 
Methods inherited from class oracle.cabo.share.nls.LocaleContext
equals, getBundle, getDateFormatContext, getDecimalFormatContext, getIANALocaleString, getLocale, getReadingDirection, getTimeZone, getTranslationIANALocaleString, getTranslationLocale, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MutableLocaleContext

public MutableLocaleContext()
Creates a MutableLocaleContext based off of the default Locale.

MutableLocaleContext

public MutableLocaleContext(java.util.Locale baseLocale)
Creates a MutableLocaleContext based off of the specified Locale.

MutableLocaleContext

public MutableLocaleContext(java.util.Locale baseLocale,
                            java.util.Locale translationLocale)
Creates a MutableLocaleContext based off of the specified Locale and using a different Locale for translations. Applications that only provide translations for a subset of the Locales provided by subcomponents can use the translation Locale to force subcomponents to only use translations in a language supported by the application.

Parameters:
baseLocale - Locale providing default behavior for the LocaleContext. If not specified, the defualt Locale is used.
translationLocale - Locale to use for translations. If not specified, the baseLocale is used.

MutableLocaleContext

public MutableLocaleContext(LocaleContext context)
Creates a MutableLocaleContext based on a pre-existing LocaleContext.
Method Detail

setReadingDirection

public void setReadingDirection(int newReadingDirection)
Sets the new reading direction to be one of the reading directions defined in oracle.bali.share.nls.LocaleUtils.

If set to any value other than LocaleUtils.DIRECTION_DEFAULT, the new value will override the default determination of the reading direction based on the Locale.

Overrides:
setReadingDirection in class LocaleContext
See Also:
LocaleContext.getReadingDirection(), LocaleUtils

setTimeZone

public void setTimeZone(java.util.TimeZone newTimeZone)
Sets the TimeZone that the user is running in. Setting this value to null will set the TimeZone to the default TimeZone.
Overrides:
setTimeZone in class LocaleContext
Following copied from class: oracle.cabo.share.nls.LocaleContext
See Also:
MutableLocaleContext

setDateFormatContext

public final void setDateFormatContext(DateFormatContext dateFormatContext)
Sets the DateFormatContext containing all date format parameters. If necessary, this dateFormatContext is cloned and wrapped inside an ImmutableDateFormatContext which is returned by getDateFormatContext.

setDecimalFormatContext

public final void setDecimalFormatContext(DecimalFormatContext decimalFormatContext)
Sets the DecimalFormatContext containing all number format parameters. If necessary, this decimalFormatContext is cloned and wrapped inside an ImmutableDecimalFormatContext which is returned by getDecimalFormatContext.

getDateFormatContextImpl

protected DateFormatContext getDateFormatContextImpl()
Returns the DateFormatContext containing all date format parameters.
Overrides:
getDateFormatContextImpl in class LocaleContext

setDateFormatContextImpl

protected void setDateFormatContextImpl(DateFormatContext dateFormatContext)
Sets the DateFormatContext containing all date format parameters.

getDecimalFormatContextImpl

protected DecimalFormatContext getDecimalFormatContextImpl()
Returns the DecimalFormatContext containing all number format parameters.
Overrides:
getDecimalFormatContextImpl in class LocaleContext

setDecimalFormatContextImpl

protected void setDecimalFormatContextImpl(DecimalFormatContext decimalFormatContext)
Sets the DecimalFormatContext containing all number format parameters.

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.