1 |
/* |
2 |
* JSampler - a java front-end for LinuxSampler |
3 |
* |
4 |
* Copyright (C) 2005-2008 Grigor Iliev <grigor@grigoriliev.com> |
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.view.fantasia; |
24 |
|
25 |
import java.awt.event.MouseListener; |
26 |
|
27 |
import javax.swing.JComponent; |
28 |
|
29 |
/** |
30 |
* |
31 |
* @author Grigor Iliev |
32 |
*/ |
33 |
public interface ChannelView { |
34 |
public static enum Type { SMALL, NORMAL } |
35 |
|
36 |
/** Determines the type of the view. */ |
37 |
public Type getType(); |
38 |
|
39 |
public JComponent getComponent(); |
40 |
|
41 |
/** Configures the view. */ |
42 |
public void installView(); |
43 |
|
44 |
/** Reverses configuration which was done during <code>installView</code>. */ |
45 |
public void uninstallView(); |
46 |
|
47 |
/** |
48 |
* Creates and installs a channel options view for this channel view. |
49 |
* Note that this method does nothing if there is installed view already. |
50 |
*/ |
51 |
public void installChannelOptionsView(); |
52 |
|
53 |
/** |
54 |
* Reverses configuration which was done during <code>installChannelOptionsView</code>. |
55 |
*/ |
56 |
public void uninstallChannelOptionsView(); |
57 |
|
58 |
public ChannelOptionsView getChannelOptionsView(); |
59 |
|
60 |
/** |
61 |
* Updates the channel settings. This method is invoked when changes to the |
62 |
* channel were made. |
63 |
*/ |
64 |
public void updateChannelInfo(); |
65 |
|
66 |
/** |
67 |
* Invoked when the number of active disk streams has changed. |
68 |
* @param count The new number of active disk streams. |
69 |
*/ |
70 |
public void updateStreamCount(int count); |
71 |
|
72 |
|
73 |
/** |
74 |
* Invoked when the number of active voices has changed. |
75 |
* @param count The new number of active voices. |
76 |
*/ |
77 |
public void updateVoiceCount(int count); |
78 |
|
79 |
public void expandChannel(); |
80 |
|
81 |
/** Determines whether the <code>Options</code> button is selected. */ |
82 |
public boolean isOptionsButtonSelected(); |
83 |
|
84 |
/** |
85 |
* Sets whether the <code>Options</code> button should be selected or not. |
86 |
* Note that this method does not trigger an actionEvent. |
87 |
*/ |
88 |
public void setOptionsButtonSelected(boolean b); |
89 |
|
90 |
/** |
91 |
* Registers the specified listener to listen on the component |
92 |
* and some of its children. |
93 |
*/ |
94 |
public void addEnhancedMouseListener(MouseListener l); |
95 |
|
96 |
/** Removes the specified listener. */ |
97 |
public void removeEnhancedMouseListener(MouseListener l); |
98 |
|
99 |
} |