javax.accessibility

Class AccessibleBundle

public abstract class AccessibleBundle extends Object

This serves as a base class for accessibility "enumerations". These objects are strongly typed; to make up for the lack of true enums in Java. Display should be locale dependent.

Since: 1.2

See Also: AccessibleRole AccessibleState

UNKNOWN: updated to 1.4, but missing Locale support

Field Summary
protected Stringkey
The locale independent name of the object.
Constructor Summary
AccessibleBundle()
Default constructor.
Method Summary
protected StringtoDisplayString(String resourceBundle, Locale locale)
Obtains the key as a localized string, falling back to the locale-independent version if necessary.
StringtoDisplayString(Locale locale)
Obtains the key as a localized string, falling back to the locale-independent version if necessary.
StringtoDisplayString()
Obtains the key as a localized string, using the default locale.
StringtoString()
Obtains the key as a localized string, using the default locale.

Field Detail

key

protected String key
The locale independent name of the object. This is for the computer, not necessarily for humans; changing it in subclasses is frowned upon.

See Also: AccessibleBundle

Constructor Detail

AccessibleBundle

public AccessibleBundle()
Default constructor.

Method Detail

toDisplayString

protected String toDisplayString(String resourceBundle, Locale locale)
Obtains the key as a localized string, falling back to the locale-independent version if necessary.

Parameters: resourceBundle the resource to use for lookup locale the locale to translate to

Returns: the translated name

Throws: NullPointerException if resourceBundle or locale is null

UNKNOWN: For now, no transformation is done.

toDisplayString

public String toDisplayString(Locale locale)
Obtains the key as a localized string, falling back to the locale-independent version if necessary.

Parameters: locale the locale to translate to

Returns: the translated name

Throws: NullPointerException if locale is null

UNKNOWN: For now, no transformation is done.

toDisplayString

public String toDisplayString()
Obtains the key as a localized string, using the default locale.

Returns: the translated name

UNKNOWN: For now, no transformation is done.

toString

public String toString()
Obtains the key as a localized string, using the default locale.

Returns: the translated name

UNKNOWN: For now, no transformation is done.