Skip to content

Commit c4f5c92

Browse files
committed
Several more examples; audio .au file reading;
1 parent f420b13 commit c4f5c92

File tree

182 files changed

+25706
-48421
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+25706
-48421
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package a2s;
2+
3+
interface A2SContainer {
4+
5+
A2SListener getA2SListener();
6+
7+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
package edu.northwestern.physics.groups.atomic.applet;
2+
3+
import java.awt.Color;
4+
import java.awt.GridLayout;
5+
import a2s.Label;
6+
import a2s.Panel;
7+
8+
public class Banner extends Panel {
9+
10+
private static final long serialVersionUID = 1L;
11+
12+
public Banner(int n, int m) {
13+
final Color darkMagenta = new Color(150, 0, 150);
14+
setBackground(darkMagenta);
15+
setLayout(new GridLayout(n, m, 40, -5)); /* nr,nc, vg, hg */
16+
}
17+
18+
public Banner(String name) {
19+
final Color darkMagenta = new Color(150, 0, 150);
20+
setBackground(darkMagenta);
21+
setLayout(new GridLayout(2, 2, 40, -5));
22+
setForeground(Color.white);
23+
add(new Label("Department of Physics and Astronomy"){
24+
{
25+
setForeground(Color.white);
26+
}
27+
28+
});
29+
add(new Label("Virtual Interactive Demonstration"){
30+
{
31+
setForeground(Color.white);
32+
}
33+
34+
});
35+
add(new Label("Northwestern University"){
36+
{
37+
setForeground(Color.white);
38+
}
39+
40+
});
41+
add(new Label(name){
42+
{
43+
setForeground(Color.white);
44+
}
45+
46+
});
47+
}
48+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
package edu.northwestern.physics.groups.atomic.applet;
2+
3+
import java.awt.Graphics;
4+
import java.awt.Point;
5+
6+
class Caption implements InsertText {
7+
private final int x[] = { 13, 31, 32, 33, 30, 34, 30, 34, 6, 7, 8, 9, 13,
8+
17, 19, 20, 21, 29, 35, 5, 9, 12, 13, 16, 17, 18, 22, 29, 35, 43,
9+
44, 45, 46, 47, 48, 49, 50, 5, 13, 17, 22, 29, 30, 31, 32, 33, 34,
10+
35, 6, 7, 13, 17, 22, 29, 35, 8, 13, 17, 22, 29, 35, 39, 43, 44,
11+
45, 46, 47, 48, 49, 50, 9, 13, 17, 22, 29, 35, 38, 39, 5, 9, 13,
12+
17, 22, 30, 34, 39, 5, 6, 7, 8, 12, 13, 14, 16, 17, 18, 21, 22, 23,
13+
30, 34, 39, 31, 32, 33, 39, 39, 14, 38, 39, 40, 31, 32, 33, 7, 8,
14+
9, 10, 14, 18, 20, 21, 22, 30, 34, 6, 10, 13, 14, 17, 18, 19, 23,
15+
30, 34, 43, 44, 45, 46, 47, 48, 49, 50, 6, 14, 18, 23, 29, 35, 7,
16+
8, 14, 18, 23, 29, 35, 9, 14, 18, 23, 29, 30, 31, 32, 33, 34, 35,
17+
43, 44, 45, 46, 47, 48, 49, 50, 10, 14, 18, 23, 29, 35, 6, 10, 14,
18+
18, 23, 29, 35, 6, 7, 8, 9, 13, 14, 15, 17, 18, 19, 22, 23, 24, 29,
19+
35, 37, 38, 30, 34, 36, 39, 30, 34, 39, 31, 32, 33, 38, 37, 36, 36,
20+
37, 38, 39, 39 };
21+
22+
private final int y[] = { 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7,
23+
7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9,
24+
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 11, 11,
25+
11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12,
26+
12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14,
27+
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 16, 17,
28+
17, 17, 17, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
29+
22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
30+
22, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25,
31+
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26,
32+
26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28,
33+
28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 30,
34+
30, 30, 31, 31, 31, 31, 32, 33, 34, 34, 34, 34, 34 };
35+
36+
public Point elementAt(int i) {
37+
return new Point(x[i], y[i]);
38+
}
39+
40+
public void plot(Graphics g, int xx, int yy) {
41+
for (int i = 0; i < x.length; i++) {
42+
g.drawLine(xx + x[i], yy + y[i], xx + x[i], yy + y[i]);
43+
}
44+
}
45+
46+
public int size() {
47+
return x.length;
48+
}
49+
}

0 commit comments

Comments
 (0)