sji18n
Class I18nEvent

java.lang.Object
  extended by java.util.EventObject
      extended by sji18n.I18nEvent
All Implemented Interfaces:
Serializable

public class I18nEvent
extends EventObject

Represents events fired when a locale was changed in a particular context. These events always have the I18n class as source, i.e. the class itself, not I18n instances.

See Also:
I18n, Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
I18nEvent(String context, Locale locale)
          Creates a new instance.
 
Method Summary
 boolean equals(Object o)
           
 String getContext()
          Gives the name of the context for which the locale was changed.
 Locale getLocale()
          Gives the new locale recently set.
 int hashCode()
           
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

I18nEvent

public I18nEvent(String context,
                 Locale locale)
Creates a new instance.

Parameters:
context - the context for which the locale was changed, may be null to indicate the default nameless context.
locale - the new locale set for the specified context, must not be null.
Method Detail

getContext

public String getContext()
Gives the name of the context for which the locale was changed. This name is null in case of the default nameless context, 'logging' in case of the logging context.

Returns:
a string representing the name of the changed context, may be null to indicate the default nameless context.

getLocale

public Locale getLocale()
Gives the new locale recently set.

Returns:
a valid Locale locale instance, never null.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

Get sji18n at SourceForge.net. Fast, secure and Free Open Source software downloadsCopyright © 2009-2010, Paul Neyens
All Rights Reserved.