source: gli/branches/rtl-gli/src/org/greenstone/gatherer/gui/SimpleMenuBar.java@ 18297

Last change on this file since 18297 was 18297, checked in by kjdon, 15 years ago

interface updated to display right to left for rtl languages. This code is thanks to Amin Hejazi. It seems to be only partially complete. Amin was working with Greenstone 3 so might have missed some panels

  • Property svn:keywords set to Author Date Id Revision
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.