diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-10-14 05:31:07 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-10-14 05:31:07 +0000 |
commit | 78a4b9ed4b3f9d5533e058722b6ae51c7aa51f1e (patch) | |
tree | 7edd744393baa971ad33c2b642d1a0249cd8848c /java/gjt/ChoiceCardPanel.java | |
parent | af62d68095ddb3b0334a8a6d7ef55f1709808028 (diff) | |
download | ATCD-78a4b9ed4b3f9d5533e058722b6ae51c7aa51f1e.tar.gz |
This commit was manufactured by cvs2svn to create tag 'ACE-4_5_53'.ACE-4_5_53
Diffstat (limited to 'java/gjt/ChoiceCardPanel.java')
-rw-r--r-- | java/gjt/ChoiceCardPanel.java | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/java/gjt/ChoiceCardPanel.java b/java/gjt/ChoiceCardPanel.java deleted file mode 100644 index 6273e03a5aa..00000000000 --- a/java/gjt/ChoiceCardPanel.java +++ /dev/null @@ -1,53 +0,0 @@ -package gjt; - -import java.awt.*; - -/** - * ChoiceCardPanel is an extension of CardPanel which presents - * an awt.Choice for selecting the panel to be displayed - * in the center panel.<p> - * - * @version 1.0, Apr 1 1996 - * @author David Geary - * @see CardPanel - * @see IconCardPanel - * @see gjt.test.IconCardPanelTest - * @see gjt.test.ChoiceCardPanelTest - */ -public class ChoiceCardPanel extends CardPanel { - private ChoiceViewSelector viewSelector; - - public ChoiceCardPanel() { - viewSelector = new ChoiceViewSelector(this); - } - public Component viewSelector() { - return viewSelector; - } - public void addChoice(String name, - Component component) { - viewSelector.addItem(name); - super.addView(name, component); - } -} - -class ChoiceViewSelector extends Panel { - private ChoiceCardPanel mvp; - private Choice choice; - - public ChoiceViewSelector(ChoiceCardPanel panel) { - setLayout(new FlowLayout()); - add(choice = new Choice()); - mvp = panel; - } - public void addItem(String name) { - choice.addItem(name); - } - public boolean handleEvent(Event event) { - if(event.id == Event.ACTION_EVENT) { - if(event.target instanceof Choice) { - mvp.showView(choice.getSelectedItem()); - } - } - return super.handleEvent(event); - } -} |