diff options
Diffstat (limited to 'songdbj/org/tritonus/share/sampled/mixer/TControlController.java')
-rw-r--r-- | songdbj/org/tritonus/share/sampled/mixer/TControlController.java | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/songdbj/org/tritonus/share/sampled/mixer/TControlController.java b/songdbj/org/tritonus/share/sampled/mixer/TControlController.java new file mode 100644 index 0000000000..ec17c45b59 --- /dev/null +++ b/songdbj/org/tritonus/share/sampled/mixer/TControlController.java | |||
@@ -0,0 +1,98 @@ | |||
1 | /* | ||
2 | * TControlController.java | ||
3 | * | ||
4 | * This file is part of Tritonus: http://www.tritonus.org/ | ||
5 | */ | ||
6 | |||
7 | /* | ||
8 | * Copyright (c) 2001 by Matthias Pfisterer | ||
9 | * | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU Library General Public License as published | ||
13 | * by the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | * This program is distributed in the hope that it will be useful, | ||
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 | * GNU Library General Public License for more details. | ||
20 | * | ||
21 | * You should have received a copy of the GNU Library General Public | ||
22 | * License along with this program; if not, write to the Free Software | ||
23 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
24 | * | ||
25 | */ | ||
26 | |||
27 | /* | ||
28 | |<--- this code is formatted to fit into 80 columns --->| | ||
29 | */ | ||
30 | |||
31 | package org.tritonus.share.sampled.mixer; | ||
32 | |||
33 | import java.util.Collection; | ||
34 | import java.util.ArrayList; | ||
35 | import java.util.HashSet; | ||
36 | import java.util.Iterator; | ||
37 | import java.util.List; | ||
38 | import java.util.Set; | ||
39 | |||
40 | import javax.sound.sampled.AudioSystem; | ||
41 | import javax.sound.sampled.Control; | ||
42 | import javax.sound.sampled.Line; | ||
43 | import javax.sound.sampled.LineEvent; | ||
44 | import javax.sound.sampled.LineListener; | ||
45 | import javax.sound.sampled.LineUnavailableException; | ||
46 | import javax.sound.sampled.Port; | ||
47 | |||
48 | import org.tritonus.share.TDebug; | ||
49 | |||
50 | |||
51 | |||
52 | |||
53 | /** Base class for classes implementing Line. | ||
54 | */ | ||
55 | public class TControlController | ||
56 | implements TControllable | ||
57 | { | ||
58 | /** The parent (compound) control. | ||
59 | In case this control is part of a compound control, the parentControl | ||
60 | property is set to a value other than null. | ||
61 | */ | ||
62 | private TCompoundControl m_parentControl; | ||
63 | |||
64 | |||
65 | public TControlController() | ||
66 | { | ||
67 | } | ||
68 | |||
69 | |||
70 | |||
71 | public void setParentControl(TCompoundControl compoundControl) | ||
72 | { | ||
73 | m_parentControl = compoundControl; | ||
74 | } | ||
75 | |||
76 | |||
77 | public TCompoundControl getParentControl() | ||
78 | { | ||
79 | return m_parentControl; | ||
80 | } | ||
81 | |||
82 | |||
83 | public void commit() | ||
84 | { | ||
85 | if (TDebug.TraceControl) | ||
86 | { | ||
87 | TDebug.out("TControlController.commit(): called [" + this.getClass().getName() + "]"); | ||
88 | } | ||
89 | if (getParentControl() != null) | ||
90 | { | ||
91 | getParentControl().commit(); | ||
92 | } | ||
93 | } | ||
94 | } | ||
95 | |||
96 | |||
97 | |||
98 | /*** TControlController.java ***/ | ||