Class FontPool
- All Implemented Interfaces:
MultiAssetLoader<Font>,Destructible
-
Field Summary
Fields inherited from class dev.prozilla.pine.common.asset.pool.AssetPool
eventDispatcher, NOT_FOUND_ERROR, UNKNOWN_ERROR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FontcreateAsset(String path) Creates a new asset from a normalized path.protected StringCreates a key for the current asset.Loads an asset from a path or retrieves it from the pool if it has already been loaded once.protected StringNormalizes a path.protected voidPrepares this pool for the next asset.booleanRemoves an asset from this pool.Methods inherited from class dev.prozilla.pine.common.asset.pool.AssetPool
addListener, count, destroy, fail, fail, getAssets, printInfo, printInfo, remove, removeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.prozilla.pine.common.asset.pool.MultiAssetLoader
loadAll, loadAll
-
Constructor Details
-
FontPool
public FontPool()
-
-
Method Details
-
load
-
load
Description copied from class:AssetPoolLoads an asset from a path or retrieves it from the pool if it has already been loaded once.This method is protected because some subclasses may require additional parameters to load an asset.
-
createAsset
Description copied from class:AssetPoolCreates a new asset from a normalized path.- Specified by:
createAssetin classAssetPool<Font>- Parameters:
path- The normalized path- Returns:
- The new asset, or
nullif the asset creation failed.
-
remove
Description copied from class:AssetPoolRemoves an asset from this pool. -
prepareNext
protected void prepareNext()Description copied from class:AssetPoolPrepares this pool for the next asset.- Overrides:
prepareNextin classAssetPool<Font>
-
createKey
Description copied from class:AssetPoolCreates a key for the current asset. -
normalize
Description copied from class:AssetPoolNormalizes a path.
-