diff options
Diffstat (limited to 'java/gjt/IconCardPanel.java')
-rw-r--r-- | java/gjt/IconCardPanel.java | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/java/gjt/IconCardPanel.java b/java/gjt/IconCardPanel.java deleted file mode 100644 index 78940bf8f4f..00000000000 --- a/java/gjt/IconCardPanel.java +++ /dev/null @@ -1,55 +0,0 @@ -package gjt; - -import java.awt.*; - -/** - * A CardPanel whose Component viewSelector() returns - * a panel with image buttons to control the selection of the - * panel to be displayed beneath the view selector panel.<p> - * - * @version 1.0, Apr 1 1996 - * @author David Geary - * @see CardPanel - * @see ChoiceCardpanel - * @see gjt.test.IconCardPanelTest - */ -public class IconCardPanel extends CardPanel { - private ImageButtonPanel viewSelector; - - public IconCardPanel() { - viewSelector = new IconViewSelector(this); - } - public Component viewSelector() { - return viewSelector; - } - public void addImageButton(Image image, - String name, - Component component) { - ImageButton newButton; - - viewSelector.add( - newButton = new ImageButton(image), name); - newButton.setController( - new StickyImageButtonController(newButton)); - super.addView(name, component); - } -} - -class IconViewSelector extends ImageButtonPanel { - private IconCardPanel mvp; - - public IconViewSelector(IconCardPanel panel) { - super(Orientation.HORIZONTAL); - setLayout(new FlowLayout()); - mvp = panel; - } - public boolean handleEvent(Event event) { - if(event.id == Event.MOUSE_DOWN) { - if(event.target instanceof ImageButton) { - ImageButton ib = (ImageButton)event.target; - mvp.showView(getButtonName(ib)); - } - } - return super.handleEvent(event); - } -} |