Class LoopTrack

  • All Implemented Interfaces:
    IPlayableTrack

    public class LoopTrack
    extends java.lang.Object
    implements IPlayableTrack
    LoopTrack represents a track that can be looped.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2015 Created on Jun 17, 2015
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javafx.scene.media.AudioClip clip  
      private double length  
      private javafx.beans.property.BooleanProperty playing  
    • Constructor Summary

      Constructors 
      Constructor Description
      LoopTrack​(double length, java.lang.String fileUrl)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getLength()
      Retrieve the length of the track in seconds
      void play()
      Start playing the track.
      javafx.beans.property.ReadOnlyBooleanProperty playingProperty()
      Property indicating if the track is playing.
      void stop()
      Stop playing the track.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • length

        private final double length
      • clip

        private javafx.scene.media.AudioClip clip
      • playing

        private javafx.beans.property.BooleanProperty playing
    • Constructor Detail

      • LoopTrack

        public LoopTrack​(double length,
                         java.lang.String fileUrl)
    • Method Detail

      • getLength

        public double getLength()
        Description copied from interface: IPlayableTrack
        Retrieve the length of the track in seconds
        Specified by:
        getLength in interface IPlayableTrack
        Returns:
        length of the track in seconds
      • playingProperty

        public javafx.beans.property.ReadOnlyBooleanProperty playingProperty()
        Description copied from interface: IPlayableTrack
        Property indicating if the track is playing.
        Specified by:
        playingProperty in interface IPlayableTrack
        Returns:
        boolean property indicating if the track is currently playing.