cz.zcu.fav.kiv.editor.controller.resource
Enum LanguageEnum

java.lang.Object
  extended by java.lang.Enum<LanguageEnum>
      extended by cz.zcu.fav.kiv.editor.controller.resource.LanguageEnum
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<LanguageEnum>

public enum LanguageEnum
extends java.lang.Enum<LanguageEnum>

The EncodingEnum class is the enumerated list of languages used in the application.

Version:
1.0, 05/2007
Author:
Marta Vaclavikova

Enum Constant Summary
CS
           
EN
           
 
Method Summary
static java.util.Locale getDefaultLocale()
          Gets the current value of the default locale for this instance of the Java Virtual Machine.
static LanguageEnum getLanguage(java.util.Locale loc)
          Returns LanguageEnum language for corresponding locale.
 java.util.Locale getLocale()
           
static java.util.Locale parseLocale(java.lang.String language)
          Parses input string containing language and returns corresponding locale language.
 java.lang.String toString()
          Returns title of the language loaded from resources ResourceController.
static LanguageEnum valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static LanguageEnum[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

EN

public static final LanguageEnum EN

CS

public static final LanguageEnum CS
Method Detail

values

public static LanguageEnum[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (LanguageEnum c : LanguageEnum.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static LanguageEnum valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

toString

public java.lang.String toString()
Returns title of the language loaded from resources ResourceController.

Overrides:
toString in class java.lang.Enum<LanguageEnum>
Returns:
the language title loaded from ResourceController.

getLanguage

public static LanguageEnum getLanguage(java.util.Locale loc)
Returns LanguageEnum language for corresponding locale.

Parameters:
loc - the locale of the language.
Returns:
the language for the input locale.

parseLocale

public static java.util.Locale parseLocale(java.lang.String language)
Parses input string containing language and returns corresponding locale language.

Parameters:
language - the input text constant containing language.
Returns:
the locale corresponding to the input text constant.

getLocale

public java.util.Locale getLocale()

getDefaultLocale

public static java.util.Locale getDefaultLocale()
Gets the current value of the default locale for this instance of the Java Virtual Machine. Returns only supported value - CS or EN.

Returns:
the locale of this instance of JVM.