PenProfile 2.x

com.livescribe.i18n
Class ResourceBundle

java.lang.Object
  extended by com.livescribe.i18n.ResourceBundle

public abstract class ResourceBundle
extends Object

ResourceBundle encapsulates the localized resources for an application. An instance of the bundle is got from the PenletContext class


Field Summary
static String MIME_AUDIO_AAC
          AAC MIME Type
static String MIME_AUDIO_WAV
          Wave MIME Type
static String MIME_AUDIO_WAVPACK
          Wave Pack MIME Type
static String MIME_IMAGE_ARW
          ARW Image MIME Type
static String MIME_UNKNOWN
          Unknown MIME Type
 
Constructor Summary
protected ResourceBundle(Locale locale)
          Construct a ResourceBundle for the specified locale
 
Method Summary
abstract  DisplayableResource getDisplayResource(String id)
          Returns the localized display resource for the identifier passed.
abstract  ImageResource getImageResource(String id)
          Returns the localized image resource for the identifier passed.
 Locale getLocale()
          Returns the locale of the bundle.
abstract  SoundResource getSoundResource(String id)
          Returns the localized sound resource for the identifier passed.
abstract  TextResource getTextResource(String id)
          Returns the localized text resource for the identifier passed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIME_UNKNOWN

public static final String MIME_UNKNOWN
Unknown MIME Type

See Also:
Constant Field Values

MIME_AUDIO_AAC

public static final String MIME_AUDIO_AAC
AAC MIME Type

See Also:
Constant Field Values

MIME_AUDIO_WAV

public static final String MIME_AUDIO_WAV
Wave MIME Type

See Also:
Constant Field Values

MIME_AUDIO_WAVPACK

public static final String MIME_AUDIO_WAVPACK
Wave Pack MIME Type

See Also:
Constant Field Values

MIME_IMAGE_ARW

public static final String MIME_IMAGE_ARW
ARW Image MIME Type

See Also:
Constant Field Values
Constructor Detail

ResourceBundle

protected ResourceBundle(Locale locale)
Construct a ResourceBundle for the specified locale

Parameters:
locale - locale for which the bundle needs to be created.
Method Detail

getDisplayResource

public abstract DisplayableResource getDisplayResource(String id)
Returns the localized display resource for the identifier passed. If the localized resource does not exist for the current locale or if the identifier is null, then it returns a null value. The returned resource is either a TextResource or ImageResource

Parameters:
id - identifier for the resource. This MUST be a non-null value.
Returns:
displayable resource.

getTextResource

public abstract TextResource getTextResource(String id)
Returns the localized text resource for the identifier passed. If the localized resource does not exist for the current locale or if the identifier is null, then it returns a null value.

Parameters:
id - identifier for the resource. This MUST be a non-null value.
Returns:
text resource

getImageResource

public abstract ImageResource getImageResource(String id)
Returns the localized image resource for the identifier passed. If the localized resource does not exist for the current locale or if the identifier is null, then it returns a null value.

Parameters:
id - identifier for the resource. This MUST be a non-null value.
Returns:
image resource

getSoundResource

public abstract SoundResource getSoundResource(String id)
Returns the localized sound resource for the identifier passed. If the localized resource does not exist for the current locale or if the identifier is null, then it returns a null value.

Parameters:
id - identifier for the resource. This MUST be a non-null value.
Returns:
sound resource

getLocale

public final Locale getLocale()
Returns the locale of the bundle.

Returns:
bundle's locale.

PenProfile 2.x

Copyright © 2010 Livescribe Inc. All Rights Reserved.
Confidential and subject to NDA.