/Users/lyon/j4p/src/sound/filterDesign/BodeEvent.java
|
1 package sound.filterDesign;
2
3 // Decompiled by Jad v1.5.8c. Copyright 2001 Pavel Kouznetsov.
4 // Jad home page: http://www.geocities.com/kpdus/jad.html
5 // Decompiler options: packimports(3)
6 // Source File Name: BodeEvent.java
7
8 import java.util.EventObject;
9 import java.util.Vector;
10
11 public class BodeEvent extends EventObject {
12
13 public BodeEvent(Object obj) {
14 super(obj);
15 root = null;
16 type = 6;
17 position = -1;
18 gain = 1.0D;
19 }
20
21 public BodeEvent(Object obj, Root root1, int i) {
22 super(obj);
23 root = root1;
24 type = i;
25 position = -1;
26 gain = 1.0D;
27 }
28
29 public BodeEvent(Object obj, Root root1, int i, int j) {
30 super(obj);
31 root = root1;
32 type = i;
33 position = j;
34 gain = 1.0D;
35 }
36
37 public BodeEvent(Object obj, Vector vector, double d, int i) {
38 super(obj);
39 pole = new Vector();
40 zero = new Vector();
41 gain = d;
42 synchronized (this) {
43 switch (i) {
44 case 7: // '\007'
45 for (int j = 0; j < vector.size(); j++)
46 pole.addElement(
47 new Pole((Pole) vector.elementAt(j)));
48
49 break;
50
51 case 8: // '\b'
52 for (int k = 0; k < vector.size(); k++)
53 zero.addElement(
54 new Zero((Zero) vector.elementAt(k)));
55
56 break;
57
58 case 10: // '\n'
59 for (int l = 0; l < vector.size(); l++)
60 pole.addElement(vector.elementAt(l));
61
62 break;
63
64 case 11: // '\013'
65 for (int i1 = 0; i1 < vector.size(); i1++)
66 zero.addElement(vector.elementAt(i1));
67
68 break;
69 }
70 }
71 type = i;
72 position = -1;
73 }
74
75 public BodeEvent(Object obj,
76 Vector vector,
77 Vector vector1,
78 double d,
79 int i) {
80 super(obj);
81 pole = new Vector();
82 zero = new Vector();
83 gain = d;
84 synchronized (this) {
85 switch (i) {
86 case 9: // '\t'
87 case 16: // '\020'
88 for (int j = 0; j < vector.size(); j++)
89 pole.addElement(
90 new Pole((Pole) vector.elementAt(j)));
91
92 for (int k = 0; k < vector1.size(); k++)
93 zero.addElement(
94 new Zero((Zero) vector1.elementAt(k)));
95
96 break;
97
98 case 12: // '\f'
99 for (int l = 0; l < vector.size(); l++)
100 pole.addElement(vector.elementAt(l));
101
102 for (int i1 = 0; i1 < vector1.size(); i1++)
103 zero.addElement(vector1.elementAt(i1));
104
105 break;
106 }
107 }
108 type = i;
109 position = -1;
110 }
111
112 public BodeEvent(Object obj, double ad[], int i) {
113 super(obj);
114 switch (i) {
115 case 13: // '\r'
116 poles = new double[ad.length];
117 System.arraycopy(ad, 0, poles, 0, ad.length);
118 break;
119
120 case 14: // '\016'
121 zeros = new double[ad.length];
122 System.arraycopy(ad, 0, zeros, 0, ad.length);
123 break;
124 }
125 type = i;
126 position = -1;
127 }
128
129 public BodeEvent(Object obj, double ad[], double ad1[], int i) {
130 super(obj);
131 poles = new double[ad.length];
132 zeros = new double[ad1.length];
133 System.arraycopy(ad, 0, poles, 0, ad.length);
134 System.arraycopy(ad1, 0, zeros, 0, ad1.length);
135 type = i;
136 position = -1;
137 }
138
139 public Root getRoot() {
140 return root;
141 }
142
143 public int getType() {
144 return type;
145 }
146
147 public int getPosition() {
148 return position;
149 }
150
151 public Vector getPoles() {
152 return pole;
153 }
154
155 public Vector getZeros() {
156 return zero;
157 }
158
159 public double[] getPolyPole() {
160 return poles;
161 }
162
163 public double[] getPolyZero() {
164 return zeros;
165 }
166
167 public double getGain() {
168 return gain;
169 }
170
171 Vector pole;
172 Vector zero;
173 double poles[];
174 double zeros[];
175 Root root;
176 int type;
177 int position;
178 double gain;
179 }
180