TV-Browser 3.3.3 API

util.ui
Class PooledLocalizer

java.lang.Object
  extended by util.ui.Localizer
      extended by util.ui.PooledLocalizer

public class PooledLocalizer
extends Localizer

localizer using the String pool for all messages. You should use this instead of the standard localizer if your object will be instantiated many times with the same constant strings

Author:
bananeweizen

Field Summary
 
Fields inherited from class util.ui.Localizer
I18N_ADD, I18N_BACK, I18N_CANCEL, I18N_CHANNEL, I18N_CHANNELS, I18N_CLOSE, I18N_DEFAULT, I18N_DELETE, I18N_DOWN, I18N_EDIT, I18N_ERROR, I18N_FILE, I18N_HELP, I18N_INFO, I18N_LEFT, I18N_NEXT, I18N_OK, I18N_OPTIONS, I18N_PICTURES, I18N_PROGRAM, I18N_PROGRAMS, I18N_RIGHT, I18N_SELECT, I18N_SETTINGS, I18N_STANDARD, I18N_TODAY, I18N_TOMORROW, I18N_UP, I18N_WARNING, I18N_YESTERDAY
 
Method Summary
static Localizer getLocalizerFor(java.lang.Class clazz)
           
 java.lang.String msg(java.lang.String key, java.lang.String defaultMsg)
          Gets a localized message.
 java.lang.String msg(java.lang.String key, java.lang.String defaultMsg, boolean warn)
          Gets a localized message.
 java.lang.String msg(java.lang.String key, java.lang.String defaultMsg, java.lang.Object arg1)
          Gets a localized message.
 java.lang.String msg(java.lang.String key, java.lang.String defaultMsg, java.lang.Object[] args)
          Gets a localized message.
 java.lang.String msg(java.lang.String key, java.lang.String defaultMsg, java.lang.Object arg1, java.lang.Object arg2)
          Gets a localized message.
 java.lang.String msg(java.lang.String key, java.lang.String defaultMsg, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
          Gets a localized message.
 
Methods inherited from class util.ui.Localizer
addLocalizerToCache, ellipsis, ellipsisMsg, ellipsisMsg, emptyLocalizerCache, getAllAvailableLocales, getCachedLocalizerFor, getEllipsisLocalization, getLocaleForString, getLocalization, hasMessage, initializeForClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLocalizerFor

public static Localizer getLocalizerFor(java.lang.Class clazz)

msg

public java.lang.String msg(java.lang.String key,
                            java.lang.String defaultMsg)
Description copied from class: Localizer
Gets a localized message.

Overrides:
msg in class Localizer
Parameters:
key - The key of the message.
defaultMsg - The default message (English)
Returns:
a localized message.

msg

public java.lang.String msg(java.lang.String key,
                            java.lang.String defaultMsg,
                            boolean warn)
Description copied from class: Localizer
Gets a localized message.

Overrides:
msg in class Localizer
Parameters:
key - The key of the message.
defaultMsg - The default message (English)
warn - If warnings should be logged if key is not found.
Returns:
a localized message.

msg

public java.lang.String msg(java.lang.String key,
                            java.lang.String defaultMsg,
                            java.lang.Object arg1)
Description copied from class: Localizer
Gets a localized message.

Overrides:
msg in class Localizer
Parameters:
key - The key of the message.
defaultMsg - The default message (English)
arg1 - The argument that should replace {0}.
Returns:
a localized message.

msg

public java.lang.String msg(java.lang.String key,
                            java.lang.String defaultMsg,
                            java.lang.Object arg1,
                            java.lang.Object arg2)
Description copied from class: Localizer
Gets a localized message.

Overrides:
msg in class Localizer
Parameters:
key - The key of the message.
defaultMsg - The default message. (English)
arg1 - The argument that should replace {0}.
arg2 - The argument that should replace {1}.
Returns:
a localized message.

msg

public java.lang.String msg(java.lang.String key,
                            java.lang.String defaultMsg,
                            java.lang.Object arg1,
                            java.lang.Object arg2,
                            java.lang.Object arg3)
Description copied from class: Localizer
Gets a localized message.

Overrides:
msg in class Localizer
Parameters:
key - The key of the message.
defaultMsg - The default message. (English)
arg1 - The argument that should replace {0}.
arg2 - The argument that should replace {1}.
arg3 - The argument that should replace {2}.
Returns:
a localized message.

msg

public java.lang.String msg(java.lang.String key,
                            java.lang.String defaultMsg,
                            java.lang.Object[] args)
Description copied from class: Localizer
Gets a localized message.

Overrides:
msg in class Localizer
Parameters:
key - The key of the message.
defaultMsg - The default message. (English)
args - The arguments that should replace the appropriate place holder. See MessageFormat for details.
Returns:
a localized message.

TV-Browser 3.3.3 API

TV-Browser 3.3.3, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)