|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.charlesames.utility.common.Disposable
net.charlesames.music.musicxml.MusicXmlEntity
net.charlesames.music.musicxml.Measure
public abstract class Measure
The abstract Measure class implements shared functionality for MusicXML measure elements.
| Method Summary | |
|---|---|
void |
addEvent(TimedEvent event)
Add a specified TimedEvent instance to the collection. |
void |
advanceTime()
Advance Time by NoteDuration. |
Barline |
createBarline(BarStyle barStyle)
Create a Barline instance with the indicated style. |
KeySignature |
createKeySignature(int fifths,
Mode mode)
Create a KeySignature instance with the indicated parameters. |
TimeSignature |
createTimeSignature(int beats,
int beatType)
Create a TimeSignature instance with the indicated parameters. |
void |
dispose()
Release resources engaged by this object, thus rendering it amenable to garbage collection. |
int |
divisionsFromRatio(Ratio time)
Convert the specified ratio from quarter notes to divisions. |
boolean |
equals(MusicXmlEntity other)
Test if this MusicXML entity has the same content as another object. |
Attributes |
getAttributes(int time)
Look for an Attributes instance at the indicated time; if one exists, return it; otherwise create a new instance. |
int |
getDivisions()
Setter for the Divisions property. |
java.util.List<TimedEvent> |
getEvents()
Get all events in the measure. |
YesNo |
getImplicit()
Getter for the Implicit property. |
int |
getMeasureDuration()
Getter for the MeasureDuration property. |
MeasurePrint |
getMeasurePrint()
Getter for the MeasurePrint property. |
int |
getNoteDuration()
Getter for the NoteDuration property. |
int |
getNumber()
Getter for the Number property. |
int |
getTime()
Getter for the Time property |
int |
getWidth()
Getter for the Width property |
void |
putXmlData(org.w3c.dom.Element element)
|
void |
setDivisions(int divisions)
Getter for the Divisions property. |
void |
setImplicit(YesNo implicit)
Setter for the Implicit property. |
void |
setMeasureDuration(int measureDuration)
Setter for the MeasureDuration property. |
void |
setMeasurePrint(MeasurePrint measurePrint)
Setter for the MeasurePrint property. |
void |
setNoteDuration(int noteDuration)
Setter for the NoteDuration property. |
void |
setNumber(int number)
Setter for the Number property. |
void |
setStaves(int staves)
Setter for the Staves property. |
void |
setTime(int time)
Setter for the Time property. |
void |
setWidth(int width)
Setter for the Width property. |
| Methods inherited from class net.charlesames.music.musicxml.MusicXmlEntity |
|---|
getContainer, makeDirty, toXmlNode |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void dispose()
Disposable
dispose in class Disposablepublic int getNumber()
public void setNumber(int number)
number - The intended Number value.public YesNo getImplicit()
public void setImplicit(YesNo implicit)
implicit - The intended Implicit value.public int getWidth()
public void setWidth(int width)
width - The intended Width value.public int getTime()
public void setTime(int time)
time - The intended Time value.public void advanceTime()
IllegalArgumentException if the resulting Time exceeds MeaureDuration.
public Attributes getAttributes(int time)
Attributes instance at the indicated time; if one exists, return it; otherwise create a new instance.
time - The indicated time.
Attributes instance at the indicated time.public void setStaves(int staves)
staves - The indented Staves value.
public TimeSignature createTimeSignature(int beats,
int beatType)
TimeSignature instance with the indicated parameters.
beats - The number of beats in a measure.beatType - 1=whole, 2=half, 3=quarter, 4=eighth, and so forth.
TimeSignature instance with the indicated parameters.public int getDivisions()
public void setDivisions(int divisions)
divisions - The intended Divisions value.public int divisionsFromRatio(Ratio time)
time - The specified ratio relative to the quarter note.
public KeySignature createKeySignature(int fifths,
Mode mode)
KeySignature instance with the indicated parameters.
fifths - Number of sharps (positive) or flats (negative).mode - major or minor.
KeySignature instance with the indicated parameters.public Barline createBarline(BarStyle barStyle)
Barline instance with the indicated style.
barStyle - the indicated style.
Barline instance with the indicated style.public int getMeasureDuration()
public void setMeasureDuration(int measureDuration)
measureDuration - The intended MeasureDuration value in divisions.public int getNoteDuration()
public void setNoteDuration(int noteDuration)
noteDuration - The intended NoteDuration value.public MeasurePrint getMeasurePrint()
public void setMeasurePrint(MeasurePrint measurePrint)
measurePrint - The intended MeasurePrint value.public java.util.List<TimedEvent> getEvents()
TimedEvent instances.public void addEvent(TimedEvent event)
TimedEvent instance to the collection.
event - The specified TimedEvent instance.public void putXmlData(org.w3c.dom.Element element)
public boolean equals(MusicXmlEntity other)
MusicXmlEntity
equals in class MusicXmlEntityother - The other object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||