|
JSampler v0.8a |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jsampler.DefaultOrchestraModel
public class DefaultOrchestraModel
This class provides default implementation of the OrchestraModel interface.
| Constructor Summary | |
|---|---|
DefaultOrchestraModel()
Creates a new instance of DefaultOrchestraModel. |
|
| Method Summary | |
|---|---|
void |
addInstrument(OrchestraInstrument instr)
Adds the specified instrument to this orchestra. |
void |
addOrchestraListener(OrchestraListener l)
Registers the specified listener for receiving event messages. |
java.lang.String |
getDescription()
Gets a brief description about this orchestra. |
OrchestraInstrument |
getInstrument(int idx)
Gets the instrument at the specified position. |
int |
getInstrumentCount()
Gets the current number of instruments in this orchestra. |
int |
getInstrumentIndex(OrchestraInstrument instr)
Gets the position of the specified instrument in this orchestra. |
java.lang.String |
getName()
Gets the name of this orchestra. |
void |
insertInstrument(OrchestraInstrument instr,
int idx)
Inserts the specified instrument at the specified position. |
void |
moveInstrumentAtBottom(OrchestraInstrument instr)
Moves the specified instrument at the bottom of the instrument list. |
void |
moveInstrumentDown(OrchestraInstrument instr)
Moves the specified instrument one position down in the instrument list. |
void |
moveInstrumentOnTop(OrchestraInstrument instr)
Moves the specified instrument one the top of the instrument list. |
void |
moveInstrumentUp(OrchestraInstrument instr)
Moves the specified instrument one position up in the instrument list. |
void |
readObject(org.w3c.dom.Node node)
Reads and sets the content of this orchestra provided by node. |
void |
removeInstrument(int idx)
Removes the specified instrument from this orchestra. |
boolean |
removeInstrument(OrchestraInstrument instr)
Removes the specified instrument from this orchestra. |
void |
removeOrchestraListener(OrchestraListener l)
Removes the specified listener. |
void |
setDescription(java.lang.String desc)
Sets a description about this orchestra. |
void |
setName(java.lang.String name)
Sets the name of this orchestra. |
java.lang.String |
toString()
Returns the name of this orchestra. |
void |
writeObject(org.w3c.dom.Document doc,
org.w3c.dom.Node node)
Writes the content of this orchestra to the specified node of document doc. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultOrchestraModel()
DefaultOrchestraModel.
| Method Detail |
|---|
public void addOrchestraListener(OrchestraListener l)
addOrchestraListener in interface OrchestraModell - The OrchestraListener to register.public void removeOrchestraListener(OrchestraListener l)
removeOrchestraListener in interface OrchestraModell - The OrchestraListener to remove.public java.lang.String getName()
getName in interface OrchestraModelpublic void setName(java.lang.String name)
setName in interface OrchestraModelname - The new name of this orchestra.public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getDescription()
getDescription in interface OrchestraModelpublic void setDescription(java.lang.String desc)
setDescription in interface OrchestraModeldesc - A brief description about this orchestra.public int getInstrumentCount()
getInstrumentCount in interface OrchestraModelpublic OrchestraInstrument getInstrument(int idx)
getInstrument in interface OrchestraModelidx - The index of the instrument to be returned.
public void addInstrument(OrchestraInstrument instr)
addInstrument in interface OrchestraModelinstr - The instrument to be added.
java.lang.IllegalArgumentException - If instr is null.
public void insertInstrument(OrchestraInstrument instr,
int idx)
insertInstrument in interface OrchestraModelinstr - The instrument to be inserted.idx - The position of the instrument.
java.lang.IllegalArgumentException - If instr is null.
java.lang.ArrayIndexOutOfBoundsException - If the specified index is invalid.public void removeInstrument(int idx)
removeInstrument in interface OrchestraModelidx - The index of the instrument to remove.public boolean removeInstrument(OrchestraInstrument instr)
removeInstrument in interface OrchestraModelinstr - The instrument to remove.
true if the specified instrument was in this orchestra,
false otherwise.public int getInstrumentIndex(OrchestraInstrument instr)
getInstrumentIndex in interface OrchestraModelinstr - The instrument whose index should be returned.
instr is null or
the orchestra does not contain the specified instrument.public void moveInstrumentOnTop(OrchestraInstrument instr)
instr is null,
the orchestra does not contain the specified instrument,
or if the instrument is already on the top.
moveInstrumentOnTop in interface OrchestraModelinstr - The instrument to move on top.public void moveInstrumentUp(OrchestraInstrument instr)
instr is null,
the orchestra does not contain the specified instrument,
or if the instrument is already on the top.
moveInstrumentUp in interface OrchestraModelinstr - The instrument to move up.public void moveInstrumentDown(OrchestraInstrument instr)
instr is null,
the orchestra does not contain the specified instrument,
or if the instrument is already at the bottom.
moveInstrumentDown in interface OrchestraModelinstr - The instrument to move down.public void moveInstrumentAtBottom(OrchestraInstrument instr)
instr is null,
the orchestra does not contain the specified instrument,
or if the instrument is already at the bottom.
moveInstrumentAtBottom in interface OrchestraModelinstr - The instrument to move at bottom.public void readObject(org.w3c.dom.Node node)
node.
readObject in interface OrchestraModelnode - The node providing the content of this orchestra.
java.lang.IllegalArgumentException - If an error occurs while
reading the content of this orchestra.
public void writeObject(org.w3c.dom.Document doc,
org.w3c.dom.Node node)
doc.
writeObject in interface OrchestraModeldoc - The document containing node.node - Specifies the node where the content of this orchestra
should be written.
|
JSampler v0.8a |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||