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

Last change on this file since 11662 was 10012, checked in by mdewsnip, 19 years ago

Removed the last of the graphical functions from the Utility class -- meaning that it can now be used by server-side programs for the GLI applet.

  • Property svn:keywords set to Author Date Id Revision
File size: 784 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.util.JarTools;
8
9public class SimpleMenuBar
10 extends JMenuBar
11 implements ActionListener {
12
13 private String page_name;
14
15 public SimpleMenuBar(String page_name) {
16 this.page_name = page_name;
17 JMenu help = new JMenu();
18 help.setIcon(JarTools.getImage("help.gif"));
19 Dictionary.setText(help, "Menu.Help");
20
21 JMenuItem help_help = new JMenuItem();
22 help_help.addActionListener(this);
23 Dictionary.setText(help_help, "Menu.Help");
24
25 help.add(help_help);
26
27 add(Box.createHorizontalGlue());
28 add(help);
29 }
30
31 public void actionPerformed(ActionEvent event) {
32 HelpFrame.setView(page_name);
33 }
34}
Note: See TracBrowser for help on using the repository browser.