Class VideoAdapter.Loader

java.lang.Object
org.opensourcephysics.media.core.VideoAdapter.Loader
All Implemented Interfaces:
XML.ObjectLoader
Direct Known Subclasses:
MovieVideo.Loader
Enclosing class:
VideoAdapter

public abstract static class VideoAdapter.Loader extends Object implements XML.ObjectLoader
A class to save and load and save Video data.
  • Constructor Details

    • Loader

      protected Loader()
  • Method Details

    • createVideo

      protected abstract Video createVideo(String path) throws IOException
      subclassed to GifVideo, ImageVideo, JSMovieVideo, and XuggleVideo
      Parameters:
      path -
      Returns:
      Throws:
      IOException
    • saveObject

      public void saveObject(XMLControl control, Object obj)
      Saves video data to an XMLControl. GIFVideo and MovieVideo only
      Specified by:
      saveObject in interface XML.ObjectLoader
      Parameters:
      control - the control to save to
      obj - the Video object to save
    • createObject

      public Object createObject(XMLControl control)
      Creates a new Video.
      Specified by:
      createObject in interface XML.ObjectLoader
      Parameters:
      control - the control
      Returns:
      the new Video
    • loadObject

      public Object loadObject(XMLControl control, Object obj)
      This does nothing, but is required by the XML.ObjectLoader interface
      Specified by:
      loadObject in interface XML.ObjectLoader
      Parameters:
      control - the control
      obj - the Video object
      Returns:
      the loaded object