Class JFXMediaLoader
java.lang.Object
nl.colorize.multimedialib.renderer.java2d.StandardMediaLoader
nl.colorize.multimedialib.renderer.jfx.JFXMediaLoader
- All Implemented Interfaces:
MediaLoader
Media implementation for JavaFX. Everything related to graphics uses a
JavaFX-specific implementation that does not rely on AWT, Java2D, or Swing.
Everything not related to graphics is delegated to the Java2D
renderer.
-
Field Summary
Fields inherited from class nl.colorize.multimedialib.renderer.java2d.StandardMediaLoader
fontFamilies -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected javafx.scene.text.FontloadAudio(nl.colorize.util.ResourceFile file) Loads an audio clip from a file.Loads a TrueType or FreeType font so the renderer can use that font for text rendering.loadImage(nl.colorize.util.ResourceFile file) Loads an image from a file.Methods inherited from class nl.colorize.multimedialib.renderer.java2d.StandardMediaLoader
containsResourceFile, getApplicationDataFile, getLoadStatus, loadApplicationData, loadModel, loadText, locateFile, saveApplicationDataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nl.colorize.multimedialib.renderer.MediaLoader
loadAtlas, loadDefaultFont, loadProperties, loadTextLines, loadTranslationBundle
-
Constructor Details
-
JFXMediaLoader
public JFXMediaLoader()
-
-
Method Details
-
loadImage
Description copied from interface:MediaLoaderLoads an image from a file. Images in JPEG and PNG format are supported by all renderers.- Specified by:
loadImagein interfaceMediaLoader- Overrides:
loadImagein classStandardMediaLoader
-
loadAudio
Description copied from interface:MediaLoaderLoads an audio clip from a file. MP3 files are supported by all renderers.- Specified by:
loadAudioin interfaceMediaLoader- Overrides:
loadAudioin classStandardMediaLoader
-
loadFont
public FontFace loadFont(nl.colorize.util.ResourceFile file, String family, int size, ColorRGB color) Description copied from interface:MediaLoaderLoads a TrueType or FreeType font so the renderer can use that font for text rendering. This will return a font for the specified style, alternative styles can be derived from the returned font.- Specified by:
loadFontin interfaceMediaLoader- Overrides:
loadFontin classStandardMediaLoader
-
getFont
-