java.lang.Object
com.virtuosotechnologies.lib.base.LinkedObject
com.virtuosotechnologies.asaph.standardmodel.BaseSongMember
com.virtuosotechnologies.asaph.standardmodel.StdChordAnnotation
- All Implemented Interfaces:
- com.virtuosotechnologies.asaph.model.ChordAnnotation, com.virtuosotechnologies.asaph.model.SongLineMember, com.virtuosotechnologies.asaph.model.SongMember
- class StdChordAnnotation
- extends BaseSongMember
- implements com.virtuosotechnologies.asaph.model.ChordAnnotation
Standard implementation of ChordAnnotation
| Fields inherited from class com.virtuosotechnologies.lib.base.LinkedObject |
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
chordSet_
private StdChordSet chordSet_
main_
private com.virtuosotechnologies.asaph.model.notation.Chord main_
pre_
private com.virtuosotechnologies.asaph.model.notation.Chord[] pre_
post_
private com.virtuosotechnologies.asaph.model.notation.Chord[] post_
StdChordAnnotation
StdChordAnnotation(StdSongLine parent,
StdChordSet chordSet,
com.virtuosotechnologies.asaph.model.notation.Chord main,
com.virtuosotechnologies.asaph.model.notation.Chord[] pre,
com.virtuosotechnologies.asaph.model.notation.Chord[] post)
unparse
void unparse(com.virtuosotechnologies.lib.xml.XMLUnparser unparser)
throws java.io.IOException
getSongLine
public com.virtuosotechnologies.asaph.model.SongLine getSongLine()
- Get the containing song line
- Specified by:
getSongLine in interface com.virtuosotechnologies.asaph.model.SongLineMember
getChordSet
public com.virtuosotechnologies.asaph.model.ChordSet getChordSet()
- Get the ChordSet relevant to this annotation. Every annotation
is part of a ChordSet. Note that this method may be slow, since
implementations may need to search the Song for the correct
ChordSet. If all you need to do is determine whether this
annotation is associated with a given ChordSet, use isInChordSet
instead, which may be optimized by the implementation.
- Specified by:
getChordSet in interface com.virtuosotechnologies.asaph.model.ChordAnnotation
isInChordSet
public boolean isInChordSet(com.virtuosotechnologies.asaph.model.ChordSet cs)
- Returns true if this annotation in the given ChordSet.
Implementations of this method may be faster than
getChordSet().equals(). Returns false but does not throw
an exception if the given ChordSet is null, or is not a
member of the Song containing this annotation
- Specified by:
isInChordSet in interface com.virtuosotechnologies.asaph.model.ChordAnnotation
getPrimaryChord
public com.virtuosotechnologies.asaph.model.notation.Chord getPrimaryChord()
- Get the primary chord.
- Specified by:
getPrimaryChord in interface com.virtuosotechnologies.asaph.model.ChordAnnotation
getPrecedingChords
public com.virtuosotechnologies.asaph.model.notation.Chord[] getPrecedingChords()
- Get the array of chords that should precede the main chord.
This will return an empty array if there are no preceding chords.
- Specified by:
getPrecedingChords in interface com.virtuosotechnologies.asaph.model.ChordAnnotation
getFollowingChords
public com.virtuosotechnologies.asaph.model.notation.Chord[] getFollowingChords()
- Get the array of chords that should follow the main chord.
This will return an empty array if there are no following chords.
- Specified by:
getFollowingChords in interface com.virtuosotechnologies.asaph.model.ChordAnnotation
setPrimaryChord
public void setPrimaryChord(com.virtuosotechnologies.asaph.model.notation.Chord chord,
javax.swing.event.UndoableEditListener undoListener)
- Set the primary chord. The primary chord may not be null.
- Specified by:
setPrimaryChord in interface com.virtuosotechnologies.asaph.model.ChordAnnotation
analyzeNewChords
private com.virtuosotechnologies.asaph.model.notation.Chord[] analyzeNewChords(com.virtuosotechnologies.asaph.model.notation.Chord[] chords,
com.virtuosotechnologies.asaph.model.notation.Chord[] oldChords)
setPrecedingChords
public void setPrecedingChords(com.virtuosotechnologies.asaph.model.notation.Chord[] chords,
javax.swing.event.UndoableEditListener undoListener)
- Set the array of chords that should precede the main one.
You may pass null or the empty array for no preceding chords.
- Specified by:
setPrecedingChords in interface com.virtuosotechnologies.asaph.model.ChordAnnotation
setFollowingChords
public void setFollowingChords(com.virtuosotechnologies.asaph.model.notation.Chord[] chords,
javax.swing.event.UndoableEditListener undoListener)
- Set the array of chords that should follow the main one.
You may pass null or the empty array for no following chords.
- Specified by:
setFollowingChords in interface com.virtuosotechnologies.asaph.model.ChordAnnotation
internalSetDefunct
void internalSetDefunct()
internalClearDefunct
void internalClearDefunct()
internalReportUndoableEdit
void internalReportUndoableEdit(javax.swing.event.UndoableEditListener undoListener,
javax.swing.undo.UndoableEdit edit)
internalGetParent
BaseSongMember internalGetParent()
isDefunct
public boolean isDefunct()
- Returns true if this object is defunct-- that is, if it or any of its
ancestors has been removed. If this returns true, the behavior of any
other methods on this object is undefined.
- Specified by:
isDefunct in interface com.virtuosotechnologies.asaph.model.SongMember
getSong
public com.virtuosotechnologies.asaph.model.Song getSong()
- Returns the Song containing this SongMember. If this member is defunct,
this will return the song that contained this member before the member
was defuncted.
- Specified by:
getSong in interface com.virtuosotechnologies.asaph.model.SongMember