source: other-projects/FileTransfer-WebSocketPair/testGXTWithGreenstone/src/org/greenstone/gatherer/gui/SimpleMenuBar.java

Last change on this file was 33053, checked in by ak19, 5 years ago

I still had some stuff of Nathan Kelly's (FileTransfer-WebSocketPair) sitting on my USB. Had already commited the Themes folder at the time, 2 years back. Not sure if he wanted this additional folder commited. But I didn't want to delete it and decided it will be better off on SVN. When we use his project, if we find we didn't need this test folder, we can remove it from svn then.

File size: 977 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 this.setComponentOrientation(Dictionary.getOrientation());
18 JMenu help = new JMenu();
19 help.setComponentOrientation(Dictionary.getOrientation());
20 help.setIcon(JarTools.getImage("help.gif"));
21 help.setText(Dictionary.get("Menu.Help"));
22
23 JMenuItem help_help = new JMenuItem(Dictionary.get("Menu.Help"));
24 help_help.setComponentOrientation(Dictionary.getOrientation());
25 help_help.addActionListener(this);
26
27 help.add(help_help);
28
29 add(Box.createHorizontalGlue());
30 add(help);
31 }
32
33 public void actionPerformed(ActionEvent event) {
34 HelpFrame.setView(page_name);
35 }
36}
Note: See TracBrowser for help on using the repository browser.