Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.virtuosotechnologies.asaph.standardmodel
Class StdChordSet  view StdChordSet download StdChordSet.java

java.lang.Object
  extended bycom.virtuosotechnologies.lib.base.LinkedObject
      extended bycom.virtuosotechnologies.asaph.standardmodel.BaseSongMember
          extended bycom.virtuosotechnologies.asaph.standardmodel.StdChordSet
All Implemented Interfaces:
com.virtuosotechnologies.asaph.model.ChordSet, com.virtuosotechnologies.asaph.model.SongMember

class StdChordSet
extends BaseSongMember
implements com.virtuosotechnologies.asaph.model.ChordSet

Standard implementation of ChordSet


Nested Class Summary
(package private)  class StdChordSet.AltKeyListParseHandler
           
(package private)  class StdChordSet.ParseHandler
           
 
Field Summary
private  ListHelper altKeysList_
           
private  com.virtuosotechnologies.lib.util.StringID id_
           
private  StdSimpleString keySigType_
           
private  StdSimpleString name_
           
private  StdChordSetKey nativeKey_
           
 
Fields inherited from class com.virtuosotechnologies.lib.base.LinkedObject
 
Constructor Summary
(package private) StdChordSet(StdSong parent, java.lang.String name, java.lang.String keySigType, com.virtuosotechnologies.asaph.model.notation.Note nativeKeyNote, java.lang.String nativeKeyInfo, com.virtuosotechnologies.lib.util.StringID id)
           
 
Method Summary
 com.virtuosotechnologies.asaph.model.ChordSetKey addAlternateKey(com.virtuosotechnologies.asaph.model.notation.Note note, javax.swing.event.UndoableEditListener undoListener)
          Add a new alternate key to the chord set.
 int getAlternateKeyCount()
          Get the number of alternate keys
 com.virtuosotechnologies.asaph.model.SimpleString getKeySignatureType()
          Get a SimpleString containing the key signature type.
 com.virtuosotechnologies.asaph.model.SimpleString getName()
          Get a SimpleString containing the name of the chord set.
 com.virtuosotechnologies.asaph.model.ChordSetKey getNativeKey()
          Get the ChordSetKey representing the native key signature.
 com.virtuosotechnologies.asaph.model.ChordSetKey getNextAlternateKey(com.virtuosotechnologies.asaph.model.ChordSetKey reference)
          Get the next alternate key following reference.
 com.virtuosotechnologies.asaph.model.ChordSetKey getPreviousAlternateKey(com.virtuosotechnologies.asaph.model.ChordSetKey reference)
          Get the previous alternate key preceding reference.
 java.lang.String getSerializableID()
          Get a string ID that can be used to serialize references to this ChordSet.
 com.virtuosotechnologies.asaph.model.Song getSong()
          Returns the Song containing this SongMember.
(package private)  void internalClearDefunct()
           
(package private)  BaseSongMember internalGetParent()
           
(package private)  void internalReportUndoableEdit(javax.swing.event.UndoableEditListener undoListener, javax.swing.undo.UndoableEdit edit)
           
(package private)  void internalSetDefunct()
           
 boolean isDefunct()
          Returns true if this object is defunct-- that is, if it or any of its ancestors has been removed.
 void removeAlternateKey(com.virtuosotechnologies.asaph.model.ChordSetKey alternateKey, javax.swing.event.UndoableEditListener undoListener)
          Remove the given alternate key from the chord set.
(package private)  void unparse(com.virtuosotechnologies.lib.xml.XMLUnparser unparser)
           
 
Methods inherited from class com.virtuosotechnologies.lib.base.LinkedObject
getNext, getPrevious, linkThisAfter, linkThisBefore, unlinkThis
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.virtuosotechnologies.asaph.model.SongMember
getSong, isDefunct
 

Field Detail

name_

private StdSimpleString name_

keySigType_

private StdSimpleString keySigType_

nativeKey_

private StdChordSetKey nativeKey_

altKeysList_

private ListHelper altKeysList_

id_

private com.virtuosotechnologies.lib.util.StringID id_
Constructor Detail

StdChordSet

StdChordSet(StdSong parent,
            java.lang.String name,
            java.lang.String keySigType,
            com.virtuosotechnologies.asaph.model.notation.Note nativeKeyNote,
            java.lang.String nativeKeyInfo,
            com.virtuosotechnologies.lib.util.StringID id)
Method Detail

unparse

void unparse(com.virtuosotechnologies.lib.xml.XMLUnparser unparser)
       throws java.io.IOException

getName

public com.virtuosotechnologies.asaph.model.SimpleString getName()
Get a SimpleString containing the name of the chord set. Every ChordSet will have a name, even if it is the empty string.

Specified by:
getName in interface com.virtuosotechnologies.asaph.model.ChordSet

getKeySignatureType

public com.virtuosotechnologies.asaph.model.SimpleString getKeySignatureType()
Get a SimpleString containing the key signature type. This string is typically the string that gets concatenated to the note to form a key signature. Often it begins with a space. Every ChordSet will have a key signature type, even if it is the empty string.

Specified by:
getKeySignatureType in interface com.virtuosotechnologies.asaph.model.ChordSet

getNativeKey

public com.virtuosotechnologies.asaph.model.ChordSetKey getNativeKey()
Get the ChordSetKey representing the native key signature.

Specified by:
getNativeKey in interface com.virtuosotechnologies.asaph.model.ChordSet

getAlternateKeyCount

public int getAlternateKeyCount()
Get the number of alternate keys

Specified by:
getAlternateKeyCount in interface com.virtuosotechnologies.asaph.model.ChordSet

getNextAlternateKey

public com.virtuosotechnologies.asaph.model.ChordSetKey getNextAlternateKey(com.virtuosotechnologies.asaph.model.ChordSetKey reference)
Get the next alternate key following reference. If reference is null, returns the first alternate key. If reference is the last alternate key, returns null;

Specified by:
getNextAlternateKey in interface com.virtuosotechnologies.asaph.model.ChordSet

getPreviousAlternateKey

public com.virtuosotechnologies.asaph.model.ChordSetKey getPreviousAlternateKey(com.virtuosotechnologies.asaph.model.ChordSetKey reference)
Get the previous alternate key preceding reference. If reference is null, returns the last alternate key. If reference is the first alternate key, returns null;

Specified by:
getPreviousAlternateKey in interface com.virtuosotechnologies.asaph.model.ChordSet

getSerializableID

public java.lang.String getSerializableID()
Get a string ID that can be used to serialize references to this ChordSet. The ID is guaranteed to be unique among ChordSets within the owning Song, and will remain the same for the same ChordSet across different executions of the tool. However, two ChordSets from different Songs may have the same string ID, and the same string ID may be shared between SongBlocks, Variations and ChordSets within the same Song.

Specified by:
getSerializableID in interface com.virtuosotechnologies.asaph.model.ChordSet

addAlternateKey

public com.virtuosotechnologies.asaph.model.ChordSetKey addAlternateKey(com.virtuosotechnologies.asaph.model.notation.Note note,
                                                                        javax.swing.event.UndoableEditListener undoListener)
Add a new alternate key to the chord set.

Specified by:
addAlternateKey in interface com.virtuosotechnologies.asaph.model.ChordSet

removeAlternateKey

public void removeAlternateKey(com.virtuosotechnologies.asaph.model.ChordSetKey alternateKey,
                               javax.swing.event.UndoableEditListener undoListener)
Remove the given alternate key from the chord set.

Specified by:
removeAlternateKey in interface com.virtuosotechnologies.asaph.model.ChordSet

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