APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.badlogic.gdx.assets.loaders

public Class I18NBundleLoader

extends AsynchronousAssetLoader<I18NBundle, I18NBundleLoader.I18NBundleParameter>
Class Inheritance
Imports
java.util.Locale, com.badlogic.gdx.assets.AssetDescriptor, .AssetLoaderParameters, .AssetManager, com.badlogic.gdx.files.FileHandle, com.badlogic.gdx.utils.Array, .I18NBundle

AssetLoader for I18NBundle instances. The I18NBundle is loaded asynchronously.

Notice that you can't load two bundles with the same base name and different locale or encoding using the same AssetManager. For example, if you try to load the 2 bundles below

manager.load("i18n/message", I18NBundle.class, new I18NBundleParameter(Locale.ITALIAN));
manager.load("i18n/message", I18NBundle.class, new I18NBundleParameter(Locale.ENGLISH));
the English bundle won't be loaded because the asset manager thinks they are the same bundle since they have the same name. There are 2 use cases:
Author
davebaol

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
pack-priv I18NBundle

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Array<AssetDescriptor<T>>
getDependencies(String fileName, FileHandle file, I18NBundleLoader.I18NBundleParameter parameter)

Implements abstract com.badlogic.gdx.assets.loaders.AssetLoader.getDependencies.

Returns the assets this asset requires to be loaded first.

public void
loadAsync(AssetManager manager, String fileName, FileHandle file, I18NBundleLoader.I18NBundleParameter parameter)

Implements abstract com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader.loadAsync.

Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.

public I18NBundle
loadSync(AssetManager manager, String fileName, FileHandle file, I18NBundleLoader.I18NBundleParameter parameter)

Implements abstract com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader.loadSync.

Loads the OpenGL part of the asset.

Inherited from com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader:
unloadAsync

Field Detail

bundleback to summary
pack-priv I18NBundle bundle

Constructor Detail

I18NBundleLoaderback to summary
public I18NBundleLoader(FileHandleResolver resolver)

Method Detail

getDependenciesback to summary
public Array<AssetDescriptor<T>> getDependencies(String fileName, FileHandle file, I18NBundleLoader.I18NBundleParameter parameter)

Implements abstract com.badlogic.gdx.assets.loaders.AssetLoader.getDependencies.

Doc from com.badlogic.gdx.assets.loaders.AssetLoader.getDependencies.

Returns the assets this asset requires to be loaded first. This method may be called on a thread other than the GL thread.

Annotations
@Override
loadAsyncback to summary
public void loadAsync(AssetManager manager, String fileName, FileHandle file, I18NBundleLoader.I18NBundleParameter parameter)

Implements abstract com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader.loadAsync.

Doc from com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader.loadAsync.

Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.

Annotations
@Override
loadSyncback to summary
public I18NBundle loadSync(AssetManager manager, String fileName, FileHandle file, I18NBundleLoader.I18NBundleParameter parameter)

Implements abstract com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader.loadSync.

Doc from com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader.loadSync.

Loads the OpenGL part of the asset.

Annotations
@Override
com.badlogic.gdx.assets.loaders back to summary

public Class I18NBundleLoader.I18NBundleParameter

extends AssetLoaderParameters<I18NBundle>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public final String
public final Locale
Inherited from com.badlogic.gdx.assets.AssetLoaderParameters:
loadedCallback

Constructor Summary

AccessConstructor and Description
public
public
public
I18NBundleParameter(Locale locale, String encoding)

Field Detail

encodingback to summary
public final String encoding
localeback to summary
public final Locale locale

Constructor Detail

I18NBundleParameterback to summary
public I18NBundleParameter()
I18NBundleParameterback to summary
public I18NBundleParameter(Locale locale)
I18NBundleParameterback to summary
public I18NBundleParameter(Locale locale, String encoding)