Top Description Fields Constructors Methods
com.dlsc.formsfx.model.util

public Class ResourceBundleService

extends TranslationService
Class Inheritance
Imports
java.util.ResourceBundle

The ResourceBundleService is a concrete implementation of a TranslationService and uses ResourceBundles to perform translations.
Authors
Sacha Schmid, Rinesch Murugathas

Field Summary

Modifier and TypeField and Description
private ResourceBundle

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
changeLocale(ResourceBundle
The new resource bundle to use for translations.
newValue
)

Change the resource bundle to use for this service.

public String
translate(String
The key to use for the lookup.
key
)

Implements abstract com.dlsc.formsfx.model.util.TranslationService.translate.

Looks up a key in the translation service and returns the translate string.

Inherited from com.dlsc.formsfx.model.util.TranslationService:
addListenernotifyListenersremoveListener

Field Detail

rbback to summary
private ResourceBundle rb

Constructor Detail

ResourceBundleServiceback to summary
public ResourceBundleService(ResourceBundle rb)

Method Detail

changeLocaleback to summary
public void changeLocale(ResourceBundle newValue)

Change the resource bundle to use for this service. Notifies all listeners of the locale change.

Parameters
newValue:ResourceBundle

The new resource bundle to use for translations.

translateback to summary
public String translate(String key)

Implements abstract com.dlsc.formsfx.model.util.TranslationService.translate.

Doc from com.dlsc.formsfx.model.util.TranslationService.translate.

Looks up a key in the translation service and returns the translate string.

Parameters
key:String

The key to use for the lookup.

Returns:String

The translated string.

Annotations
@Override