|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.niffty.HeirarchyNode | +--org.niffty.ScoreData
A ScoreData object encapsulates the data section of a NIFF file. A ScoreData has zero or more of Page.
Page
Constructor Summary | |
ScoreData()
Creates a new ScoreData with an empty page list. |
Method Summary | |
void |
addPage(Page page)
Add the given Page to the page list. |
Page |
getPage(int index)
Return the Page in the page list at the given index. |
int |
getPageCount()
Return the number of pages in the page list. |
Score |
getParentScore()
Return the parent Score, or null if this hasn't been added to a Score object yet. |
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 score data info including all pages. |
protected void |
setParentScore(Score parentScore)
Set the parent score. |
Methods inherited from class org.niffty.HeirarchyNode |
addChild, getChild, getChildCount, getIndex, getParentNode, nextInHeirarchy, previousInHeirarchy |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ScoreData()
Method Detail |
public void addPage(Page page)
page
- the Page to add. It is an error if
this is already the child of an object.
HeirarchyException
- if the page has already
been added as a child to another object.invalidate()
protected void setParentScore(Score parentScore)
parentScore
- the parentScore.getData() must already
be this ScoreData, and this ScoreData cannot already have
a parent. In this way, we ensure that only the Score can
call this.public Score getParentScore()
public int getPageCount()
public Page getPage(int index)
java.lang.ArrayIndexOutOfBoundsException
- if the index is negative or not
less than the number of nodes in the child node list.public void invalidate()
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 |