net.sf.doolin.gui.util
Class GUIStrings

java.lang.Object
  extended by net.sf.doolin.gui.util.GUIStrings

public class GUIStrings
extends Object

Service for localized strings.

Author:
Damien Coraboeuf

Method Summary
static String get(Object code, Object... params)
          Gets a localized string.
static String getIfPresent(String code)
          Gets a string from its code if defined, or returns null if it is not defined
static Locale getLocale()
          Gets the current locale
static boolean isDefined(String key)
          Checks if a string code is defined in the available bundles
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public static String get(Object code,
                         Object... params)
Gets a localized string.

Parameters:
code - String code
params - String parameters
Returns:
Localized string
See Also:
JStrings.get(Locale, String, Object...)

getIfPresent

public static String getIfPresent(String code)
Gets a string from its code if defined, or returns null if it is not defined

Parameters:
code - String code
Returns:
String or null if the string code is not defined
See Also:
JStrings.get(Locale, String, boolean)

getLocale

public static Locale getLocale()
Gets the current locale

Returns:
Locale
See Also:
Locale.getDefault()

isDefined

public static boolean isDefined(String key)
Checks if a string code is defined in the available bundles

Parameters:
key - String code
Returns:
true if the string code is defined
See Also:
JStrings.isDefined(Locale, String)


Copyright © 2011. All Rights Reserved.