| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
  |
  +--org.niffty.HeirarchyNode
        |
        +--org.niffty.MeasureStartTimeSlice
A MeasureStartTimeSlice has a start time and optional tags and is always type MEASURE_START. A MeasureStartTimeSlice also stores the EVENT TimeSlice objects following the measure start time slice. Strictly speaking, this is slightly different than the NIFF spec where all the time slice and music symbol chunks are on the same "level" in the Staff, but formally dividing up music symbols into their EVENT time slice, and the EVENT time slices into their MEASURE_START time slice makes the data easier to process.
TimeSlice| Constructor Summary | |
MeasureStartTimeSlice(Rational startTime,
                      Tags tags)
Creates a new MeasureStartTimeSlice with the given start time and tags, and an empty TimeSlice list.  | 
|
| Method Summary | |
 void | 
addTimeSlice(TimeSlice timeSlice)
Add the given timeslice to the TimeSlice list.  | 
 void | 
draw(java.awt.Graphics graphics)
 | 
 Rational | 
getDuration()
Return the duration of this measure.  | 
 int | 
getIndex()
Return the index of this measure start time slice in the parent's measure start time slice list.  | 
 Score | 
getParentScore()
Return the ultimate Score object of which this is a child.  | 
 Staff | 
getParentStaff()
Return the parent Staff.  | 
 FinalPoint | 
getScreenHotspot()
Get the hotspot for this object in screen coordinates.  | 
 Rational | 
getStartTime()
Returns the start time Rational.  | 
 int | 
getSymbolCount()
 | 
 int | 
getSymbolPosition(Rational startTime)
 | 
 Tags | 
getTags()
Returns the Tags object containing the optional tags.  | 
 TimeSlice | 
getTimeSlice(int index)
Return the event time slice at the given index.  | 
 int | 
getTimeSliceCount()
Return the number of event time slices in the time slice list.  | 
 int | 
getWidth()
Return the width of this measure in screen pixels.  | 
 void | 
invalidate()
This is automatically called after the object is modified to force this and all child objects to recompute their values when the "get" method is called for the value.  | 
 void | 
print(java.lang.String indent,
      java.io.PrintStream output)
This prints the time slice including all following music symbols.  | 
 java.lang.String | 
toString()
This only returns the info for this time slice, not the following music symbols.  | 
| Methods inherited from class org.niffty.HeirarchyNode | 
addChild, getChild, getChildCount, getParentNode, nextInHeirarchy, previousInHeirarchy | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
public MeasureStartTimeSlice(Rational startTime,
                             Tags tags)
startTime - see getStartTime()tags - the tags for this time slice.  If this is null,
          then this uses an empty Tags object.| Method Detail | 
public void addTimeSlice(TimeSlice timeSlice)
timeSlice - the TimeSlice to add.  It is an error if
        this is already the child of an object.
HeirarchyException - if the timeSlice has already
      been added as a child to another object.invalidate()public Staff getParentStaff()
public Score getParentScore()
public Tags getTags()
public Rational getStartTime()
public int getTimeSliceCount()
public TimeSlice getTimeSlice(int index)
java.lang.ArrayIndexOutOfBoundsException - if the index is negative or not
    less than the number of nodes in the child node list.public int getIndex()
getIndex in class HeirarchyNodeHeirarchyException - if this does not have a parent.public void invalidate()
public Rational getDuration()
public int getWidth()
public int getSymbolCount()
public int getSymbolPosition(Rational startTime)
public FinalPoint getScreenHotspot()
getScreenHotspot in interface AnchoredFinalPoint.newPoint()public void draw(java.awt.Graphics graphics)
public java.lang.String toString()
toString in class java.lang.Object
public void print(java.lang.String indent,
                  java.io.PrintStream output)
indent - A string such as "  " to print at the beginning of the lineoutput - the PrintStream to print to, such as System.out
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||