source:
trunk/gli/src/org/greenstone/gatherer/gui/SimpleMenuBar.java@
8480
Last change on this file since 8480 was 8258, checked in by , 20 years ago | |
---|---|
|
|
File size: 818 bytes |
Line | |
---|---|
1 | package org.greenstone.gatherer.gui; |
2 | |
3 | import java.awt.*; |
4 | import java.awt.event.*; |
5 | import javax.swing.*; |
6 | import org.greenstone.gatherer.Dictionary; |
7 | import org.greenstone.gatherer.help.HelpFrame; |
8 | import org.greenstone.gatherer.util.Utility; |
9 | |
10 | public 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.