anvil.annot
Class PrimaryTrack
java.lang.Object
|
+--java.util.Observable
|
+--anvil.annot.AnvilAnnotationNode
|
+--anvil.annot.AnnotationContainer
|
+--anvil.annot.AnvilTrack
|
+--anvil.annot.PrimaryTrack
- All Implemented Interfaces:
- AnnotationNode, GraphicalTrack, Track
- public class PrimaryTrack
- extends AnvilTrack
The primary track contains elements with a start and end
time. Elements do not overlap and are kept in sorted order.
Methods inherited from class anvil.annot.AnvilTrack |
elementChanged, findContainedElements, findElement, findElement, findNextAfter, findNextBefore, firstElement, getElementCoverage, getElementRate, getElements, getHeightFactor, getMaxEndTime, getTypeArray, getTypeName, lastElement, nextElement, previousElement, print, toString |
Methods inherited from class anvil.annot.AnnotationContainer |
addElement, getAnnotation, getAttributeNames, getAttributeType, getElementCollection, getNumOfElements, getReciprocalLinkAttributes, getSpec, indexElements, isEmpty, query, replaceAttributeValue, setName, unlinkElement, writeAnvilFile |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PrimaryTrack
public PrimaryTrack(Annotation annotation,
GroupNode parent,
ContainerSpec ts)
removeElement
public boolean removeElement(AnnotationElement el)
- Removes element from track if found.
- Specified by:
removeElement
in interface Track
- Specified by:
removeElement
in class AnnotationContainer
- Parameters:
el
- element to be removed
- Returns:
- true if operation was successful
offsetElements
public void offsetElements(double offset)
throws OffsetToNegativeException
- Moves all elements back or forth by the given amount.
- Parameters:
offset
- offset in seconds (negative to move left)
- Throws:
OffsetToNegativeException
- if offset moves
the first element beyond the actual start (0s) of the annotation.
findTrackAncestry
public java.util.List findTrackAncestry()
- Description copied from interface:
Track
- Returns list of tracks that this track depends on. If this track
is primary then the list is empty. If it is secondary it contains
all "higher level" track up to a primary track which occupies the
first place in the list.
- Specified by:
findTrackAncestry
in interface Track
- Specified by:
findTrackAncestry
in class AnvilTrack
findPrecedingElement
public TrackElement[] findPrecedingElement(javax.media.Time time)
- Finds element that is before the one that contains the given time
point.
- Returns:
- two track elements in an array. The preceding element or
null in index 0 and the current element in index 1. If there is
no element at
time
, null is returned.