Package uk.ac.qmul.eecs.depic.daw
Class ClipList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<Clip>
-
- uk.ac.qmul.eecs.depic.daw.ClipList
-
public class ClipList extends java.util.ArrayList<Clip>
A list of Clips- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ClipList(int scaleFactor, java.util.Map<Sample,WavePeaks> peaksMap, SoundWave wave)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
add(int index, Clip element)
Unsupported methodboolean
add(Clip s)
Adds a newSampleSelection
.boolean
addAll(int index, java.util.Collection<? extends Clip> c)
boolean
addAll(java.util.Collection<? extends Clip> collection)
void
addSoundWaveListener(SoundWaveListener l)
void
clear()
protected void
fireSoundWaveListeners(SoundWaveEvent evt)
SoundWaveEditor
getClipEditor()
java.util.List<Clip>
getClipsAt(int pos)
java.util.List<Clip>
getClipsAtTime(float time)
int
getLength()
Returns the length of the SoundWavefloat
getLengthMs()
int
getScaleFactor()
boolean
remove(java.lang.Object c)
boolean
removeAll(java.util.Collection<?> c)
boolean
removeSoundWaveListener(SoundWaveListener l)
boolean
retainAll(java.util.Collection<?> collection)
void
setScaleFactor(int newScaleFactor)
changes the scale factor of this clip list.-
Methods inherited from class java.util.ArrayList
clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeIf, removeRange, replaceAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
-
-
-
Method Detail
-
add
public boolean add(Clip s)
Adds a newSampleSelection
. The order of selections is kept (ordered insert).- Overrides:
add
in classjava.util.ArrayList<Clip>
- Parameters:
s
- the new selection to add
-
add
public void add(int index, Clip element)
Unsupported method- Overrides:
add
in classjava.util.ArrayList<Clip>
- Throws:
java.lang.UnsupportedOperationException
-
addAll
public boolean addAll(java.util.Collection<? extends Clip> collection)
- Overrides:
addAll
in classjava.util.ArrayList<Clip>
-
addAll
public boolean addAll(int index, java.util.Collection<? extends Clip> c)
- Overrides:
addAll
in classjava.util.ArrayList<Clip>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Overrides:
removeAll
in classjava.util.ArrayList<Clip>
-
retainAll
public boolean retainAll(java.util.Collection<?> collection)
- Overrides:
retainAll
in classjava.util.ArrayList<Clip>
-
remove
public boolean remove(java.lang.Object c)
- Overrides:
remove
in classjava.util.ArrayList<Clip>
-
clear
public void clear()
- Overrides:
clear
in classjava.util.ArrayList<Clip>
-
addSoundWaveListener
public void addSoundWaveListener(SoundWaveListener l)
-
removeSoundWaveListener
public boolean removeSoundWaveListener(SoundWaveListener l)
-
fireSoundWaveListeners
protected void fireSoundWaveListeners(SoundWaveEvent evt)
-
getLength
public int getLength()
Returns the length of the SoundWave- Returns:
-
getLengthMs
public float getLengthMs()
-
getClipsAt
public java.util.List<Clip> getClipsAt(int pos)
-
getClipsAtTime
public java.util.List<Clip> getClipsAtTime(float time)
-
setScaleFactor
public void setScaleFactor(int newScaleFactor)
changes the scale factor of this clip list. All the contained clips will be rescaled according to the new scale factor.- Parameters:
newScaleFactor
-
-
getScaleFactor
public int getScaleFactor()
-
getClipEditor
public SoundWaveEditor getClipEditor()
-
-