|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.niffty.HeirarchyNode | +--org.niffty.Page
A Page encapsulates the page information of a ScoreData. A Page has a PageHeader and any number of StaffSystem, NIFFFontSymbol, NIFFCustomGraphicSymbol, NIFFText, or NIFFLine.
ScoreData
Constructor Summary | |
Page(PageHeader pageHeader)
Creates a new Page with the given PageHeader and an empty StaffSystem list. |
Method Summary | |
void |
addSystem(StaffSystem staffSystem)
Add the given staffSystem to the StaffSystem list. |
void |
draw(java.awt.Graphics graphics)
|
int |
getIndex()
Return the index of this Page in the parent's page list. |
PageHeader |
getPageHeader()
|
ScoreData |
getParentData()
Return the parent ScoreData. |
Score |
getParentScore()
Return the ultimate Score object of which this is a child. |
double |
getStaffSpacingY()
Return the Y distance in screen coordinates between one staff and the next. |
StaffSystem |
getSystem(int index)
Return the StaffSystem in the staff system list at the given index. |
int |
getSystemCount()
Return the number of staff systems in the staff system list. |
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 page info including all staff systems. |
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, toString, wait, wait, wait |
Constructor Detail |
public Page(PageHeader pageHeader)
pageHeader
- the header for this PageMethod Detail |
public void addSystem(StaffSystem staffSystem)
staffSystem
- the StaffSystem to add. It is an error if
this is already the child of an object.
HeirarchyException
- if the staffSystem has already
been added as a child to another object.invalidate()
public ScoreData getParentData()
public PageHeader getPageHeader()
public int getSystemCount()
public StaffSystem getSystem(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 HeirarchyNode
HeirarchyException
- if this does not have a parent.public double getStaffSpacingY()
public void invalidate()
public Score getParentScore()
public void draw(java.awt.Graphics graphics)
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 |