Last change
on this file since 12608 was 12119, checked in by kjdon, 18 years ago |
Changed text handling to use Dictionary.get rather than Dictionary.setText or Dictionary.registerBoth etc. also removed mnemonics cos they suck for other languages
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
771 bytes
|
Rev | Line | |
---|
[8238] | 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;
|
---|
[10012] | 7 | import org.greenstone.gatherer.util.JarTools;
|
---|
[8238] | 8 |
|
---|
| 9 | public 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();
|
---|
[10012] | 18 | help.setIcon(JarTools.getImage("help.gif"));
|
---|
[12119] | 19 | help.setText(Dictionary.get("Menu.Help"));
|
---|
[8238] | 20 |
|
---|
[12119] | 21 | JMenuItem help_help = new JMenuItem(Dictionary.get("Menu.Help"));
|
---|
[8238] | 22 | help_help.addActionListener(this);
|
---|
[12119] | 23 |
|
---|
[8238] | 24 | help.add(help_help);
|
---|
| 25 |
|
---|
| 26 | add(Box.createHorizontalGlue());
|
---|
| 27 | add(help);
|
---|
| 28 | }
|
---|
[8258] | 29 |
|
---|
[8238] | 30 | public void actionPerformed(ActionEvent event) {
|
---|
[8258] | 31 | HelpFrame.setView(page_name);
|
---|
[8238] | 32 | }
|
---|
| 33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.