net.sourceforge.pavlov.randommedia
Class RandomAudioFactory
java.lang.Object
net.sourceforge.pavlov.randommedia.AbstractRandomMediaFactory
net.sourceforge.pavlov.randommedia.RandomAudioFactory
- All Implemented Interfaces:
- ActionListener, EventListener, RandomURLProvider
public class RandomAudioFactory
- extends AbstractRandomMediaFactory
- implements ActionListener, RandomURLProvider
This is a base class for random media factories. A random media factory is
supplied with a directory tree or JAR file or mixture of the two, and
randomly supplies a media object (i.e. an image, a sound) from the files.
Implementations often will require caching/preloading.
Methods inherited from class net.sourceforge.pavlov.randommedia.AbstractRandomMediaFactory |
actionPerformed, addMediaRootChangedListener, clearDirectories, disableDirectory, enableDirectory, enableDirectory, getNumberOfDisabledItems, getNumberOfEnabledItems, getNumberOfTotalItems, getRandomURL, getRootDirectory, getSubDirectoryNames, isDirectoryEnabled, notifyListeners, refresh, setRootDirectory, setRootDirectory, toggleEnabled |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomAudioFactory
public RandomAudioFactory(File myDir)
RandomAudioFactory
public RandomAudioFactory()
clearCache
public void clearCache()
- Describe
clearCache
method here.
- Specified by:
clearCache
in class AbstractRandomMediaFactory
getFileFilter
protected ZipCapableFileFilter getFileFilter()
- Describe
getFileFilter
method here.
- Specified by:
getFileFilter
in class AbstractRandomMediaFactory
- Returns:
- a
ZipCapableFileFilter
value
getRandomClip
public AudioClip getRandomClip()
playRandomClip
public void playRandomClip()
- Describe
playRandomClip
method here.