JSampler
v0.8a

org.jsampler
Interface OrchestraListModel

All Known Implementing Classes:
DefaultOrchestraListModel

public interface OrchestraListModel

A data model representing list of orchestras.


Method Summary
 void addOrchestra(OrchestraModel orchestra)
          Adds the specified orchestra to the list.
 void addOrchestraListListener(ListListener<OrchestraModel> l)
          Registers the specified listener for receiving event messages.
 OrchestraModel getOrchestra(int idx)
          Gets the orchestra at the specified position.
 int getOrchestraCount()
          Gets the current number of orchestras in the list.
 int getOrchestraIndex(OrchestraModel orchestra)
          Gets the position of the specified orchestra in this orchestra list.
 void insertOrchestra(OrchestraModel orchestra, int idx)
          Inserts the specified orchestra at the specified position.
 void moveOrchestraAtBottom(OrchestraModel orchestra)
          Moves the specified orchestra at the bottom of the orchestra list.
 void moveOrchestraDown(OrchestraModel orchestra)
          Moves the specified orchestra one position down in the orchestra list.
 void moveOrchestraOnTop(OrchestraModel orchestra)
          Moves the specified orchestra one the top of the orchestra list.
 void moveOrchestraUp(OrchestraModel orchestra)
          Moves the specified orchestra one position up in the orchestra list.
 void readObject(org.w3c.dom.Node node)
          Reads and loads the content provided by node to this orchestra list.
 void removeAllOrchestras()
          Removes all orchestras from the list.
 void removeOrchestra(int idx)
          Removes the specified orchestra from the list.
 boolean removeOrchestra(OrchestraModel orchestraModel)
          Removes the specified orchestra from the list.
 void removeOrchestraListListener(ListListener<OrchestraModel> l)
          Removes the specified listener.
 void writeObject(org.w3c.dom.Document doc, org.w3c.dom.Node node)
          Writes the content of this orchestra list to the specified node of document doc.
 

Method Detail

addOrchestraListListener

void addOrchestraListListener(ListListener<OrchestraModel> l)
Registers the specified listener for receiving event messages.

Parameters:
l - The OrchestraListListener to register.

removeOrchestraListListener

void removeOrchestraListListener(ListListener<OrchestraModel> l)
Removes the specified listener.

Parameters:
l - The OrchestraListListener to remove.

getOrchestraCount

int getOrchestraCount()
Gets the current number of orchestras in the list.

Returns:
The current number of orchestras in the list.

getOrchestra

OrchestraModel getOrchestra(int idx)
Gets the orchestra at the specified position.

Parameters:
idx - The index of the orchestra to be returned.
Returns:
The orchestra at the specified position.

addOrchestra

void addOrchestra(OrchestraModel orchestra)
Adds the specified orchestra to the list.

Parameters:
orchestra - The model of the orchestra to be added.
Throws:
java.lang.IllegalArgumentException - If orchestra is null.

insertOrchestra

void insertOrchestra(OrchestraModel orchestra,
                     int idx)
Inserts the specified orchestra at the specified position.

Parameters:
orchestra - The orchestra to be inserted.
idx - The position of the orchestra.
Throws:
java.lang.IllegalArgumentException - If orchestra is null.
java.lang.ArrayIndexOutOfBoundsException - If the specified index is invalid.

removeOrchestra

void removeOrchestra(int idx)
Removes the specified orchestra from the list.

Parameters:
idx - The index of the orchestra to remove.

removeOrchestra

boolean removeOrchestra(OrchestraModel orchestraModel)
Removes the specified orchestra from the list.

Parameters:
orchestraModel - The model of the orchestra to remove.
Returns:
true if the specified orchestra was in the list, false otherwise.

removeAllOrchestras

void removeAllOrchestras()
Removes all orchestras from the list.


getOrchestraIndex

int getOrchestraIndex(OrchestraModel orchestra)
Gets the position of the specified orchestra in this orchestra list.

Parameters:
orchestra - The orchestra whose index should be returned.
Returns:
The position of the specified orchestra in this orchestra list, and -1 if orchestra is null or the orchestra list does not contain the specified orchestra.

moveOrchestraOnTop

void moveOrchestraOnTop(OrchestraModel orchestra)
Moves the specified orchestra one the top of the orchestra list. This method does nothing if orchestra is null, the orchestra list does not contain the specified orchestra, or if the orchestra is already on the top.

Parameters:
orchestra - The orchestra to move on top.

moveOrchestraUp

void moveOrchestraUp(OrchestraModel orchestra)
Moves the specified orchestra one position up in the orchestra list. This method does nothing if orchestra is null, the orchestra list does not contain the specified orchestra, or if the orchestra is already on the top.

Parameters:
orchestra - The orchestra to move up.

moveOrchestraDown

void moveOrchestraDown(OrchestraModel orchestra)
Moves the specified orchestra one position down in the orchestra list. This method does nothing if orchestra is null, the orchestra list does not contain the specified orchestra, or if the orchestra is already at the bottom.

Parameters:
orchestra - The orchestra to move down.

moveOrchestraAtBottom

void moveOrchestraAtBottom(OrchestraModel orchestra)
Moves the specified orchestra at the bottom of the orchestra list. This method does nothing if orchestra is null, the orchestra list does not contain the specified orchestra, or if the orchestra is already at the bottom.

Parameters:
orchestra - The orchestra to move at bottom.

readObject

void readObject(org.w3c.dom.Node node)
Reads and loads the content provided by node to this orchestra list.

Parameters:
node - The node providing the content of this orchestra list.
Throws:
java.lang.IllegalArgumentException - If an error occurs while reading the content of this orchestra list.

writeObject

void writeObject(org.w3c.dom.Document doc,
                 org.w3c.dom.Node node)
Writes the content of this orchestra list to the specified node of document doc.

Parameters:
doc - The document containing node.
node - Specifies the node where the content of this orchestra list should be written.

JSampler
v0.8a

Copyright © 2007 Grigor Iliev. All rights reserved.