|
||||||||||
| 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.utility.entity.Entity
net.charlesames.utility.entity.WriteableEntity
net.charlesames.music.ensemble.EnsembleEntity
net.charlesames.music.ensemble.ContainerOfChoirsAndContours
public abstract class ContainerOfChoirsAndContours
The abstract ContainerOfChoirsAndContours class implements functionality shared between Ensemble and EnsembleChoir objects.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.charlesames.music.ensemble.EnsembleEntity |
|---|
EnsembleEntity.AttributeTable |
| Constructor Summary | |
|---|---|
ContainerOfChoirsAndContours(EnsembleEntity container,
int id,
java.lang.String name)
Constructor for ContainerOfChoirsAndContours instances. |
|
| Method Summary | |
|---|---|
boolean |
check(HtmlBuilder builder)
Check this component for errors and inconsistencies |
void |
checkNewChoirID(int id)
Check if the indicated id is usable for a new EnsembleChoir. |
void |
checkNewChoirName(java.lang.String name)
Check if the indicated name is usable for a new EnsembleChoir. |
abstract void |
checkNewContourID(int id)
Check if the indicated id is usable for a new EnsembleContour. |
abstract void |
checkNewContourIndex(int index)
Check if the indicated index is usable for a new EnsembleContour. |
abstract void |
checkNewContourName(java.lang.String name)
Check if the indicated name is usable for a new EnsembleContour. |
void |
clear()
Clear the contents of this thing. |
EnsembleChoir |
createChoir(int id,
java.lang.String name)
Create a new child choir under the present Ensemble or Choir. |
boolean |
equals(EnsembleEntity other)
Check if this entity has the same class and content as another entity. |
abstract EnsembleVoice |
getAnyVoice()
Searches for any voice specification defined under this Ensemble or Choir, or from any sub-choir. |
EnsembleChoir |
getChoir(java.lang.String path)
Use the path as a guide to work down through nested sub-choir lists until the desired choir is located. |
java.util.SortedMap<java.lang.Integer,EnsembleChoir> |
getChoirsByID()
Get the list of sub-choirs in id order |
java.util.SortedMap<java.lang.String,EnsembleChoir> |
getChoirsByName()
Get the list of sub-choirs in name order |
ContainerOfChoirsAndContours |
getContainer()
Getter for the Container property. |
int |
getDefaultChoirID()
Get the next unused choir id. |
java.lang.String |
getDefaultVoiceName()
Generate a voice name which a user interface can use in the name field of an entity-creation dialog. |
Ensemble |
getEnsemble()
Get the Ensemble which sits on top of the current object hierarchy. |
boolean |
hasChoirName(java.lang.String name)
Check if the indicated name is already used. |
void |
removeChoir(java.lang.String name)
Remove the choir with the indicated name from this component's immediate list of sub-choirs. |
void |
resequenceChoirs()
Rebuild the sequence of choir id's so that the first id is 1 and the sequence proceeds without gaps. |
void |
resolve()
|
void |
shiftChoirDown(int id)
Move a specified EnsembleChoir down within the collection (i.e. |
void |
shiftChoirsDown(int id,
int increment)
Move a block of EnsembleChoirs down within the collection. |
void |
shiftChoirUp(int id)
Move a specified EnsembleChoir up within the collection (i.e. |
void |
wipe()
Clear all data in this Entity instance. |
| Methods inherited from class net.charlesames.music.ensemble.EnsembleEntity |
|---|
buildDescription, copyToClipboard, createIndentCell, createXmlSpec, describeFeature, logError, predecessor, toString |
| Methods inherited from class net.charlesames.utility.entity.WriteableEntity |
|---|
clearXmlSpecs, createXmlSpec, getTagName, getXmlData, getXmlSpec, getXmlSpec, initializeXsd, isPersistent, logError, logError, makeDirty, putXmlData, save, setID, setName, setPersistent, setStatus, toXmlNode |
| Methods inherited from class net.charlesames.utility.entity.Entity |
|---|
decrementReferenceCount, dereferenceHandle, dispose, equals, getHandle, getID, getName, getPath, getReferenceCount, getStatus, getText, hasContainer, incrementReferenceCount, isModifiable, methodHasOverride, predecessor, resequenceEntities, setContainer, setModifiable, shiftEntitiesDown, shiftEntityDown, shiftEntityUp, successor |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ContainerOfChoirsAndContours(EnsembleEntity container,
int id,
java.lang.String name)
ContainerOfChoirsAndContours instances.
container - For a choir, this can either be an Ensemble or a Choir. For an Ensemble, this must be null.id - The entity ID.name - The entity name.| Method Detail |
|---|
public Ensemble getEnsemble()
EnsembleEntityEnsemble which sits on top of the current object hierarchy.
getEnsemble in class EnsembleEntitypublic ContainerOfChoirsAndContours getContainer()
EntityContainer property.
getContainer in class EnsembleEntityContainer value.public abstract EnsembleVoice getAnyVoice()
public java.util.SortedMap<java.lang.Integer,EnsembleChoir> getChoirsByID()
public java.util.SortedMap<java.lang.String,EnsembleChoir> getChoirsByName()
public EnsembleChoir getChoir(java.lang.String path)
path - Text detailing the chain of parent-child choir relationships leading down to the desired choir.
public boolean hasChoirName(java.lang.String name)
name - The desired choir name.
public EnsembleChoir createChoir(int id,
java.lang.String name)
id - The desired choir id. May not be already used by this instance or by any parent.name - The desired choir name. May not be already used by this instance or by any parent.
java.lang.IllegalArgumentException - when the choir name is already used.public void checkNewChoirID(int id)
EnsembleChoir.
id - The indicated id.public void checkNewChoirName(java.lang.String name)
EnsembleChoir.
name - The indicated name.public abstract void checkNewContourName(java.lang.String name)
EnsembleContour.
name - The indicated name.public abstract void checkNewContourID(int id)
EnsembleContour.
id - The indicated id.public abstract void checkNewContourIndex(int index)
EnsembleContour.
index - The indicated index.public void removeChoir(java.lang.String name)
name - The indicated name.public void resolve()
public boolean check(HtmlBuilder builder)
WriteableEntity
check in class WriteableEntitybuilder - Accumulates an HTML formatted record of each error or inconsistency found.
public java.lang.String getDefaultVoiceName()
public void resequenceChoirs()
public void shiftChoirUp(int id)
EnsembleChoir up within the collection (i.e. decrement its id).
id - The current part idpublic void shiftChoirDown(int id)
EnsembleChoir down within the collection (i.e. increment its id).
id - The current instrument id
public void shiftChoirsDown(int id,
int increment)
EnsembleChoirs down within the collection.
id - All EnsembleChoirs in the collection with id's greater than or equal to the startingID will be shifted down.increment - Number of positions to shift.public void clear()
public void wipe()
EntityEntity instance.
wipe in class Entitypublic boolean equals(EnsembleEntity other)
EnsembleEntity
equals in class EnsembleEntityother - The other entity.
public int getDefaultChoirID()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||