|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.niffty.HeirarchyNode | +--org.niffty.StaffSystem
A StaffSystem encapsulates the system information of a Page. A StaffSystem has a StaffSystemHeader, and optional NIFFStaffGrouping, and any number of Staff, NIFFFontSymbol, NIFFCustomGraphicSymbol, NIFFText, or NIFFLine.
Constructor Summary | |
StaffSystem(StaffSystemHeader systemHeader)
Creates a new StaffSystem with the given StaffSystemHeader and an empty Staff list. |
Method Summary | |
void |
addStaff(Staff staff)
Add the given staff to the Staff list. |
void |
draw(java.awt.Graphics graphics)
|
Rational |
getDuration()
Return the duration of this staff system. |
int |
getIndex()
Return the index of this StaffSystem in the parent's staff system list. |
Page |
getParentPage()
Return the parent Page. |
Score |
getParentScore()
Return the ultimate Score object of which this is a child. |
FinalPoint |
getScreenHotspot()
Get the hotspot for this object in screen coordinates. |
Staff |
getStaff(int index)
Return the Staff in the staff list at the given index. |
int |
getStaffCount()
Return the number of staves in the staff list. |
Rational |
getStartTime()
Return the global start time of this staff system. |
StaffSystemHeader |
getSystemHeader()
|
int |
getWidth()
Return the width of this staff system. |
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 staff system including all staves. |
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 StaffSystem(StaffSystemHeader systemHeader)
systemHeader
- the header for this StaffSystemMethod Detail |
public void addStaff(Staff staff)
staff
- the Staff to add. It is an error if
this is already the child of an object.
HeirarchyException
- if the staff has already
been added as a child to another object.invalidate()
public Page getParentPage()
public StaffSystemHeader getSystemHeader()
public int getStaffCount()
public Staff getStaff(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 void invalidate()
public FinalPoint getScreenHotspot()
Anchored
getScreenHotspot
in interface Anchored
FinalPoint.newPoint()
public Rational getStartTime()
public Rational getDuration()
public int getWidth()
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 |