Class FontPool
- All Implemented Interfaces:
Destructible
-
Field Summary
Fields inherited from class dev.prozilla.pine.common.asset.pool.AssetPool
eventDispatcher
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Font
createAsset
(String path) Creates a new asset from a normalized path.protected String
Loads an asset from a path or retrieves it from the pool if it has already been loaded once.protected String
Normalizes a path.protected void
Prepares this pool for the next asset.boolean
Removes an asset from this pool.
-
Constructor Details
-
FontPool
public FontPool()
-
-
Method Details
-
load
-
load
Description copied from class:AssetPool
Loads 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:AssetPool
Creates a new asset from a normalized path.- Specified by:
createAsset
in classAssetPool<Font>
- Parameters:
path
- The normalized path- Returns:
- The new asset, or
null
if the asset creation failed.
-
remove
Description copied from class:AssetPool
Removes an asset from this pool. -
prepareNext
protected void prepareNext()Description copied from class:AssetPool
Prepares this pool for the next asset.- Overrides:
prepareNext
in classAssetPool<Font>
-
createKey
-
normalize
Description copied from class:AssetPool
Normalizes a path.
-