Class HeadlessMediaLoader
java.lang.Object
nl.colorize.multimedialib.renderer.java2d.StandardMediaLoader
nl.colorize.multimedialib.renderer.headless.HeadlessMediaLoader
- All Implemented Interfaces:
MediaLoader
Media loader implementation that can be used in headless environments,
primarily for testing and simulation purposes. By default, it will load all
media files using
StandardMediaLoader
. However, image loading can
be disabled for situations in which no graphics environment is available.-
Field Summary
Fields inherited from class nl.colorize.multimedialib.renderer.java2d.StandardMediaLoader
fontCache, fontFamilies
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionloadAudio
(FilePointer file) Loads an audio clip from a file.loadFont
(FilePointer file, String family, FontStyle style) Loads a TrueType or FreeType font and converts it to a format that can be used by the renderer.loadImage
(FilePointer file) Loads an image from a file.Methods inherited from class nl.colorize.multimedialib.renderer.java2d.StandardMediaLoader
containsResourceFile, getApplicationDataFile, getGeometryBuilder, loadApplicationData, loadModel, loadText, saveApplicationData, toResourceFile
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface nl.colorize.multimedialib.renderer.MediaLoader
loadAtlas, loadDefaultFont, loadProperties, loadTextLines, loadTranslationBundle
-
Constructor Details
-
HeadlessMediaLoader
public HeadlessMediaLoader(boolean graphicsEnvironmentEnabled)
-
-
Method Details
-
loadImage
Description copied from interface:MediaLoader
Loads an image from a file. Images in JPEG and PNG format are supported by all renderers.- Specified by:
loadImage
in interfaceMediaLoader
- Overrides:
loadImage
in classStandardMediaLoader
-
loadAudio
Description copied from interface:MediaLoader
Loads an audio clip from a file. MP3 files are supported by all renderers.- Specified by:
loadAudio
in interfaceMediaLoader
- Overrides:
loadAudio
in classStandardMediaLoader
-
loadFont
Description copied from interface:MediaLoader
Loads a TrueType or FreeType font and converts it to a format that can be used by the renderer. The loaded font will be attached to the font family name specified in the font style.- Specified by:
loadFont
in interfaceMediaLoader
- Overrides:
loadFont
in classStandardMediaLoader
-