Interface DataTrack

All Superinterfaces:
Drawable, Trackable
All Known Implementing Classes:
ParticleDataTrack

public interface DataTrack extends Trackable
An interface for a Trackable object that gets its position (and optional time) data from an external source. Since it is drawn on a TrackerPanel, DataTrack includes methods related to the associated Video (start frame) and VideoPanel as well as the Data (DataClip, source, time, etc).
Author:
Douglas Brown
  • Field Details

  • Method Details

    • setStartFrame

      void setStartFrame(int start)
      Sets the video start frame at which the first data point is displayed.
      Parameters:
      start - the start frame number
    • getStartFrame

      int getStartFrame()
      Gets the video start frame at which the first data point is displayed.
      Returns:
      the start frame number
    • setStartStep

      void setStartStep(int start)
      Sets the step in the videoclip at which the first data point is displayed.
      Parameters:
      start - the start step number
    • getStartStep

      int getStartStep()
      Gets the step in the videoclip at which the first data point is displayed.
      Returns:
      the start step number
    • setData

      void setData(Data data, Object source) throws Exception
      Sets the Data for the track. Data must define "x" and "y" positions, and may define "t". Optional source may be a JPanel control panel.
      Parameters:
      data - the Data
      source - a source object (may be null)
      Throws:
      Exception
    • getData

      Data getData()
      Gets the Data.
      Returns:
      the Data
    • getSource

      Object getSource()
      Gets the source.
      Returns:
      the source (may be null)
    • getDataClip

      DataClip getDataClip()
      Gets the DataClip, which defines the start index, stepcount and stride.
      Returns:
      the DataClip
    • getVideoPanel

      VideoPanel getVideoPanel()
      Gets the VideoPanel on which this DataTrack is drawn.
      Returns:
      the VideoPanel
    • addPropertyChangeListener

      void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
      Adds a PropertyChangeListener.
      Parameters:
      listener - the PropertyChangeListener
    • isTimeDataAvailable

      boolean isTimeDataAvailable()
      Determines if time is defined by the Data.
      Returns:
      true if time data is available
    • getVideoStartTime

      double getVideoStartTime()
      Gets the data-based video start time in seconds if available
      Returns:
      the start time, or Double.NaN if undefined
    • getFrameDuration

      double getFrameDuration()
      Gets the data-based video frame duration in seconds if available
      Returns:
      the frame duration, or Double.NaN if undefined
    • isAutoPasteEnabled

      boolean isAutoPasteEnabled()
      Determines if autopaste is enabled for this DataTrack.
      Returns:
      true if autopaste is enabled