anvil.annot
Class TrackElement

java.lang.Object
  |
  +--anvil.annot.AnnotationElement
        |
        +--anvil.annot.TrackElement

public abstract class TrackElement
extends anvil.annot.AnnotationElement

Elements contained in a track. For each track type there is a respective TrackElement class.


Field Summary
static int END_TIME
           
static int START_TIME
           
 
Constructor Summary
TrackElement(anvil.annot.Track track)
           
 
Method Summary
 java.awt.Color getColor()
          Returns color of this element.
 java.lang.String getColorString()
           
 javax.media.Time getDuration()
          Returns length of element as Time object.
abstract  javax.media.Time getEndTime()
          Returns end time of the element.
 javax.media.Time getGroupStartTime()
          Returns start time of the group this element is part of.
 double getLinkDistance(java.lang.String attname, int owntime, int othertime)
          If this element is A and the linked-up elements are L1...Ln, then this method returns timepointB(L1...Ln) - timepointA(A). time points are given with static variables START_TIME and END_TIME.
abstract  javax.media.Time getStartTime()
          Returns start time of the element.
 anvil.annot.Track getTrack()
          Returns the track that contains this element.
 java.lang.String toString()
           
 void updateColor()
          Determines color of track element and stores it in the color variable.
 
Methods inherited from class anvil.annot.AnnotationElement
addAttributeLinkValue, addAttributeLinkValueOnce, clearAttribute, clearExtraObjects, clearInlinks, findAllDependentContainers, findAllDependents, getAttribute, getBoolValue, getClonedDependents, getComment, getContainer, getDependents, getExtraObject, getInlinks, getInlinkTracks, getLinkedElements, getLinkNames, getListValue, getNumberValue, getOutlinks, getShowLabel, hasComment, isAttribute, meetsConstraints, putAttribute, putExtraObject, removeMeFromInlinks, setComment, setInlinks
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

START_TIME

public static final int START_TIME
See Also:
Constant Field Values

END_TIME

public static final int END_TIME
See Also:
Constant Field Values
Constructor Detail

TrackElement

public TrackElement(anvil.annot.Track track)
Method Detail

getColor

public java.awt.Color getColor()
Returns color of this element.


getColorString

public java.lang.String getColorString()

getTrack

public anvil.annot.Track getTrack()
Returns the track that contains this element.


toString

public java.lang.String toString()
Overrides:
toString in class anvil.annot.AnnotationElement

getStartTime

public abstract javax.media.Time getStartTime()
Returns start time of the element.


getEndTime

public abstract javax.media.Time getEndTime()
Returns end time of the element.


getDuration

public javax.media.Time getDuration()
Returns length of element as Time object.


getGroupStartTime

public javax.media.Time getGroupStartTime()
Returns start time of the group this element is part of. Note that groups are a feature that is not offered anymore in Anvil but might be reactivated in the future.


updateColor

public void updateColor()
Determines color of track element and stores it in the color variable.


getLinkDistance

public double getLinkDistance(java.lang.String attname,
                              int owntime,
                              int othertime)
If this element is A and the linked-up elements are L1...Ln, then this method returns timepointB(L1...Ln) - timepointA(A). time points are given with static variables START_TIME and END_TIME.

Parameters:
attname - Name of link attribute.
owntime - Time point to measure for this element.
othertime - Time point to measure for linked element set.