Class VideoPanel.Loader

java.lang.Object
org.opensourcephysics.media.core.VideoPanel.Loader
All Implemented Interfaces:
XML.NonStaticLoader, XML.ObjectLoader, VideoIO.FinalizableLoader
Enclosing class:
VideoPanel

public static class VideoPanel.Loader extends Object implements XML.ObjectLoader, VideoIO.FinalizableLoader
A class to save and load data for this object.
  • Field Details

  • Constructor Details

    • Loader

      public Loader()
  • Method Details

    • createObject

      public Object createObject(XMLControl control)
      Return a new VideoPanel.
      Specified by:
      createObject in interface XML.ObjectLoader
      Parameters:
      control - the control
      Returns:
      the newly created object
    • loadObject

      public Object loadObject(XMLControl control, Object obj)
      Loads an object with data from an XMLControl.
      Specified by:
      loadObject in interface XML.ObjectLoader
      Parameters:
      control - the control
      obj - the VideoPanel from createObject
      Returns:
      the final VideoPanel (not necessarily obj)
    • getClip

      public boolean getClip(XMLControl control)
      Common to both VideoPanel and TrackerPanel, this method obtains the VideoClip and possibly its basePath, then either finalizes the panel or schedules that finalization for when an asynchronous video (SwingJS) is ready. Note that this method will be called multiple times if the the video is IncrementallyLoadable (Xuggle, Java).
      Parameters:
      control -
      Returns:
      false if deferring finalization (TrackerPanel AsyncVideo)
    • finalizeClip

      public Video finalizeClip()
    • finalizeLoading

      public void finalizeLoading()
      Specified by:
      finalizeLoading in interface VideoIO.FinalizableLoader
    • isFinalized

      public boolean isFinalized()
      Specified by:
      isFinalized in interface VideoIO.FinalizableLoader
    • finalize

      public void finalize()
      Overrides:
      finalize in class Object
    • saveObject

      public void saveObject(XMLControl control, Object obj)
      Saves object data to an XMLControl.
      Specified by:
      saveObject in interface XML.ObjectLoader
      Parameters:
      control - the control to save to
      obj - the object to save
    • dispose

      public void dispose()