|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcaas.midi.GeneralizedStaff
public class GeneralizedStaff
Constructor Summary | |
---|---|
GeneralizedStaff(java.lang.String[] propertyList,
java.lang.Object[] properties)
|
Method Summary | |
---|---|
StaffProperty |
getCurrentProperty(java.lang.String propertyName)
Returns the current value for a given property in a Staff. |
StaffProperty |
getDefaultProperty(java.lang.String propertyName)
Returns the default value for a given property in a Staff. |
NoteVector |
getNextNote()
getNextNote returns the next NoteVector in the sqeuence of the Staff. |
void |
replaceAllNotes(NoteVector[] newNotes)
Replaces all the notes in the Staff. |
void |
replaceNote(int location,
NoteVector newNote)
Replaces a single note in the Staff |
void |
reset()
Resets all current values for Staff properties to their default values and resets the note-position to the first note. |
void |
resetProperty(java.lang.String propertyName)
Resets the current value for a given property in a Staff to its default value. |
void |
setProperty(java.lang.String propertyName,
StaffProperty p)
Sets the current value for a given property in a Staff. |
java.lang.String |
toString()
Overwrites Object's toString method to return the Staff's Title. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GeneralizedStaff(java.lang.String[] propertyList, java.lang.Object[] properties) throws java.lang.Exception
propertyList
- a string array holding the list of the names of properties defined for this Staff.
Notes and Tempo are the only required properties.properties
- an object array holding the properities of this Staff in the order provided by propertyList.
java.lang.Exception
- indicating failed constructor.Method Detail |
---|
public NoteVector getNextNote()
getNextNote
in interface Staff
public StaffProperty getDefaultProperty(java.lang.String propertyName)
getDefaultProperty
in interface Staff
propertyName
- - a String holding the name of the property, which is the name of the class that extends StaffProperty that represents this property.
public StaffProperty getCurrentProperty(java.lang.String propertyName)
getCurrentProperty
in interface Staff
propertyName
- - a String holding the name of the property, which is the name of the class that extends StaffProperty that represents this property.
public void setProperty(java.lang.String propertyName, StaffProperty p)
setProperty
in interface Staff
propertyName
- - a String holding the name of the property, which is the name of the class that extends StaffProperty that represents this property.p
- - the StaffProperty, which must be a class of type propertyName that is current for this Staff. null if this property is not implemented.public void resetProperty(java.lang.String propertyName)
resetProperty
in interface Staff
propertyName
- - a String holding the name of the property, which is the name of the class that extends StaffProperty that represents this property.public void reset()
reset
in interface Staff
public java.lang.String toString()
toString
in class java.lang.Object
public void replaceNote(int location, NoteVector newNote)
location
- the int position of the note in the note array to changenewNote
- the new note to replace the old one withpublic void replaceAllNotes(NoteVector[] newNotes)
newNotes
- the new NoteVector Array to play
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |