summaryrefslogtreecommitdiff
path: root/java/gjt/test/IconCardPanelTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/gjt/test/IconCardPanelTest.java')
-rw-r--r--java/gjt/test/IconCardPanelTest.java47
1 files changed, 47 insertions, 0 deletions
diff --git a/java/gjt/test/IconCardPanelTest.java b/java/gjt/test/IconCardPanelTest.java
new file mode 100644
index 00000000000..33a65e1939c
--- /dev/null
+++ b/java/gjt/test/IconCardPanelTest.java
@@ -0,0 +1,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);
+ }
+}