/[svn]/jsampler/trunk/src/org/jsampler/OrchestraListModel.java
ViewVC logotype

Annotation of /jsampler/trunk/src/org/jsampler/OrchestraListModel.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 912 - (hide annotations) (download)
Mon Aug 7 18:34:40 2006 UTC (17 years, 8 months ago) by iliev
File size: 5518 byte(s)
* updating to JSampler 0.3a

1 iliev 912 /*
2     * JSampler - a java front-end for LinuxSampler
3     *
4     * Copyright (C) 2005, 2006 Grigor Kirilov Iliev
5     *
6     * This file is part of JSampler.
7     *
8     * JSampler is free software; you can redistribute it and/or modify
9     * it under the terms of the GNU General Public License version 2
10     * as published by the Free Software Foundation.
11     *
12     * JSampler is distributed in the hope that it will be useful,
13     * but WITHOUT ANY WARRANTY; without even the implied warranty of
14     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     * GNU General Public License for more details.
16     *
17     * You should have received a copy of the GNU General Public License
18     * along with JSampler; if not, write to the Free Software
19     * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20     * MA 02111-1307 USA
21     */
22    
23     package org.jsampler;
24    
25     import org.jsampler.event.OrchestraListListener;
26    
27     import org.w3c.dom.Document;
28     import org.w3c.dom.Node;
29    
30    
31     /**
32     * A data model representing list of orchestras.
33     * @author Grigor Iliev
34     */
35     public interface OrchestraListModel {
36     /**
37     * Registers the specified listener for receiving event messages.
38     * @param l The <code>OrchestraListListener</code> to register.
39     */
40     public void addOrchestraListListener(OrchestraListListener l);
41    
42     /**
43     * Removes the specified listener.
44     * @param l The <code>OrchestraListListener</code> to remove.
45     */
46     public void removeOrchestraListListener(OrchestraListListener l);
47    
48     /**
49     * Gets the current number of orchestras in the list.
50     * @return The current number of orchestras in the list.
51     */
52     public int getOrchestraCount();
53    
54     /**
55     * Gets the orchestra at the specified position.
56     * @param idx The index of the orchestra to be returned.
57     * @return The orchestra at the specified position.
58     */
59     public OrchestraModel getOrchestra(int idx);
60    
61     /**
62     * Adds the specified orchestra to the list.
63     * @param orchestra The model of the orchestra to be added.
64     * @throws IllegalArgumentException If <code>orchestra</code> is <code>null</code>.
65     */
66     public void addOrchestra(OrchestraModel orchestra);
67    
68     /**
69     * Inserts the specified orchestra at the specified position.
70     * @param orchestra The orchestra to be inserted.
71     * @param idx The position of the orchestra.
72     * @throws IllegalArgumentException If <code>orchestra</code> is <code>null</code>.
73     * @throws ArrayIndexOutOfBoundsException If the specified index is invalid.
74     */
75     public void insertOrchestra(OrchestraModel orchestra, int idx);
76    
77     /**
78     * Removes the specified orchestra from the list.
79     * @param idx The index of the orchestra to remove.
80     */
81     public void removeOrchestra(int idx);
82    
83     /**
84     * Removes the specified orchestra from the list.
85     * @param orchestraModel The model of the orchestra to remove.
86     * @return <code>true</code> if the specified orchestra was in the list,
87     * <code>false</code> otherwise.
88     */
89     public boolean removeOrchestra(OrchestraModel orchestraModel);
90    
91     /**
92     * Gets the position of the specified orchestra in this orchestra list.
93     * @param orchestra The orchestra whose index should be returned.
94     * @return The position of the specified orchestra in this orchestra list,
95     * and -1 if <code>orchestra</code> is <code>null</code> or
96     * the orchestra list does not contain the specified orchestra.
97     */
98     public int getOrchestraIndex(OrchestraModel orchestra);
99    
100     /**
101     * Moves the specified orchestra one the top of the orchestra list.
102     * This method does nothing if <code>orchestra</code> is <code>null</code>,
103     * the orchestra list does not contain the specified orchestra,
104     * or if the orchestra is already on the top.
105     * @param orchestra The orchestra to move on top.
106     */
107     public void moveOrchestraOnTop(OrchestraModel orchestra);
108    
109     /**
110     * Moves the specified orchestra one position up in the orchestra list.
111     * This method does nothing if <code>orchestra</code> is <code>null</code>,
112     * the orchestra list does not contain the specified orchestra,
113     * or if the orchestra is already on the top.
114     * @param orchestra The orchestra to move up.
115     */
116     public void moveOrchestraUp(OrchestraModel orchestra);
117    
118     /**
119     * Moves the specified orchestra one position down in the orchestra list.
120     * This method does nothing if <code>orchestra</code> is <code>null</code>,
121     * the orchestra list does not contain the specified orchestra,
122     * or if the orchestra is already at the bottom.
123     * @param orchestra The orchestra to move down.
124     */
125     public void moveOrchestraDown(OrchestraModel orchestra);
126    
127     /**
128     * Moves the specified orchestra at the bottom of the orchestra list.
129     * This method does nothing if <code>orchestra</code> is <code>null</code>,
130     * the orchestra list does not contain the specified orchestra,
131     * or if the orchestra is already at the bottom.
132     * @param orchestra The orchestra to move at bottom.
133     */
134     public void moveOrchestraAtBottom(OrchestraModel orchestra);
135    
136     /**
137     * Reads and loads the content provided by <code>node</code> to this orchestra list.
138     * @param node The node providing the content of this orchestra list.
139     * @throws IllegalArgumentException If an error occurs while
140     * reading the content of this orchestra list.
141     */
142     public void readObject(Node node);
143    
144     /**
145     * Writes the content of this orchestra list to the
146     * specified node of document <code>doc</code>.
147     * @param doc The document containing <code>node</code>.
148     * @param node Specifies the node where the content of this orchestra
149     * list should be written.
150     */
151     public void writeObject(Document doc, Node node);
152     }

  ViewVC Help
Powered by ViewVC