Last change
on this file since 18376 was 18370, checked in by kjdon, 15 years ago |
committed code submitted by Amin Hedjazi for making the GLI right to left. I worked on this code on the rtl-gli branch, then merged the branch back to the trunk at revision 18368. The branch code was slightly different in a couple of places where it shouldn't have been. So don't use the branch code next time. Start a new branch.
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
977 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.util.JarTools;
|
---|
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 | 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.