source: trunk/gli/src/org/greenstone/gatherer/gui/SimpleMenuBar.java@ 8480

Last change on this file since 8480 was 8258, checked in by mdewsnip, 20 years ago

Made HelpFrame.setView static to remove another Gatherer class dependency.

  • Property svn:keywords set to Author Date Id Revision
File size: 818 bytes
Line 
1package org.greenstone.gatherer.gui;
2
3import java.awt.*;
4import java.awt.event.*;
5import javax.swing.*;
6import org.greenstone.gatherer.Dictionary;
7import org.greenstone.gatherer.help.HelpFrame;
8import org.greenstone.gatherer.util.Utility;
9
10public class SimpleMenuBar
11 extends JMenuBar
12 implements ActionListener {
13
14 private String page_name;
15
16 public SimpleMenuBar(String page_name) {
17 this.page_name = page_name;
18 JMenu help = new JMenu();
19 help.setIcon(Utility.HELP_ICON);
20 Dictionary.setText(help, "Menu.Help");
21
22 JMenuItem help_help = new JMenuItem();
23 help_help.addActionListener(this);
24 Dictionary.setText(help_help, "Menu.Help");
25
26 help.add(help_help);
27
28 add(Box.createHorizontalGlue());
29 add(help);
30 }
31
32 public void actionPerformed(ActionEvent event) {
33 HelpFrame.setView(page_name);
34 }
35}
Note: See TracBrowser for help on using the repository browser.