blob: 33a65e1939c98493f2963a6596aa7e03d9be21b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
package gjt.test;
import java.applet.Applet;
import java.awt.*;
import java.net.URL;
import gjt.IconCardPanel;
/**
* A gjt.IconCardPanel that controls 3 Panels.<p>
*
* @version 1.0, April 25, 1996
* @author David Geary
* @see gjt.test.UnitTest
* @see gjt.IconCardPanel
*/
public class IconCardPanelTest extends UnitTest {
public String title() { return "IconCardPanel Test"; }
public Panel centerPanel() {
return new CardPanelTestPanel(this);
}
}
class CardPanelTestPanel extends Panel {
IconCardPanel mvp = new IconCardPanel();
public CardPanelTestPanel(Applet applet) {
URL cb = applet.getCodeBase();
setLayout(new BorderLayout());
Image folks = applet.getImage(cb,"gifs/cell_phone.gif");
Image pencil = applet.getImage(cb,"gifs/clipboard.gif");
Image library =
applet.getImage(cb, "gifs/mad_hacker.gif");
mvp.addImageButton(folks,
"Attributes",
new AttributesPanel(applet));
mvp.addImageButton(pencil,
"Connections",
new ConnectionsPanel());
mvp.addImageButton(library,
"Oracle",
new OccupationOracle());
add("Center", mvp);
}
}
|