Ignore:
Timestamp:
2009-01-12T13:04:29+13:00 (15 years ago)
Author:
kjdon
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/gui/MenuBar.java

    r14680 r18370  
    8787    public MenuBar(MenuListener menu_listener)
    8888    {
     89        this.setComponentOrientation(Dictionary.getOrientation());
     90       
    8991    file = new JMenu();
    9092    file.setEnabled(false);
    9193    file.setText(Dictionary.get("Menu.File"));
    92    
     94    file.setComponentOrientation(Dictionary.getOrientation());
     95       
    9396    file_associations = new JMenuItem(Dictionary.get("Menu.File_Associations"));
    9497    file_associations.addActionListener(Gatherer.g_man);     
    95    
     98    file_associations.setComponentOrientation(Dictionary.getOrientation());
     99       
    96100    file_cdimage = new JMenuItem(Dictionary.get("Menu.File_CDimage"));
    97101    file_cdimage.addActionListener(Gatherer.g_man);
    98102    file_cdimage.setEnabled(!Gatherer.isGsdlRemote);
    99    
     103    file_cdimage.setComponentOrientation(Dictionary.getOrientation());
     104       
    100105    file_close = new JMenuItem(Dictionary.get("Menu.File_Close"));
    101106    file_close.addActionListener(Gatherer.g_man);
    102107    file_close.setEnabled(false);
    103    
     108    file_close.setComponentOrientation(Dictionary.getOrientation());
     109       
    104110    file_delete = new JMenuItem(Dictionary.get("Menu.File_Delete"));
    105111    file_delete.addActionListener(Gatherer.g_man);
    106    
     112    file_delete.setComponentOrientation(Dictionary.getOrientation());
     113       
    107114    file_exit = new JMenuItem(Dictionary.get("Menu.File_Exit"));
    108115    file_exit.addActionListener(Gatherer.g_man);
    109    
     116    file_exit.setComponentOrientation(Dictionary.getOrientation());
     117       
    110118    file_exportas = new JMenuItem(Dictionary.get("Menu.File_ExportAs"));
    111119    file_exportas.addActionListener(Gatherer.g_man);
    112120    file_exportas.setEnabled((!Gatherer.isGsdlRemote && !Gatherer.GS3));
     121        file_exportas.setComponentOrientation(Dictionary.getOrientation());
    113122       
    114123    file_new = new JMenuItem(Dictionary.get("Menu.File_New"));
    115124    file_new.addActionListener(Gatherer.g_man);
    116    
     125    file_new.setComponentOrientation(Dictionary.getOrientation());
     126       
    117127    file_open = new JMenuItem(Dictionary.get("Menu.File_Open"));
    118128    file_open.addActionListener(Gatherer.g_man);
    119    
     129    file_open.setComponentOrientation(Dictionary.getOrientation());
     130       
    120131    file_options = new JMenuItem(Dictionary.get("Menu.File_Options"));
    121132    file_options.addActionListener(Gatherer.g_man);
     133        file_options.setComponentOrientation(Dictionary.getOrientation());
    122134   
    123135    file_save = new JMenuItem(Dictionary.get("Menu.File_Save"));
    124136    file_save.addActionListener(Gatherer.g_man);
    125137    file_save.setEnabled(false);
    126    
     138    file_save.setComponentOrientation(Dictionary.getOrientation());
     139       
    127140    // Layout (file menu)
    128141    file.add(file_new);
     
    144157    edit.setEnabled(false);
    145158    edit.setText(Dictionary.get("Menu.Edit"));
    146              
     159    edit.setComponentOrientation(Dictionary.getOrientation());
     160       
    147161    edit_cut = new JMenuItem(Dictionary.get("Menu.Edit_Cut"));
    148162    edit_cut.addActionListener(Gatherer.g_man);
    149    
     163    edit_cut.setComponentOrientation(Dictionary.getOrientation());
     164       
    150165    edit_copy = new JMenuItem(Dictionary.get("Menu.Edit_Copy"));
    151166    edit_copy.addActionListener(Gatherer.g_man);
     167        edit_copy.setComponentOrientation(Dictionary.getOrientation());
    152168   
    153169    edit_paste = new JMenuItem(Dictionary.get("Menu.Edit_Paste"));
    154170    edit_paste.addActionListener(Gatherer.g_man);
    155    
     171    edit_paste.setComponentOrientation(Dictionary.getOrientation());
    156172    // Layout (edit menu)
    157173    edit.add(edit_cut);
     
    163179    help.setIcon(HELP_ICON);
    164180    help.setText(Dictionary.get("Menu.Help"));
    165    
     181    help.setComponentOrientation(Dictionary.getOrientation());
     182       
    166183    help_general = new JMenuItem(Dictionary.get("Source.General"));
    167184    help_general.addActionListener(Gatherer.g_man);
    168    
     185    help_general.setComponentOrientation(Dictionary.getOrientation());
     186       
    169187    help_download = new JMenuItem(Dictionary.get("GUI.Download"), BLANK_ICON);
    170188    help_download.addActionListener(Gatherer.g_man);
    171    
     189    help_download.setComponentOrientation(Dictionary.getOrientation());
     190       
    172191    help_gather = new JMenuItem(Dictionary.get("GUI.Gather"), BLANK_ICON);
    173192    help_gather.addActionListener(Gatherer.g_man);
    174    
     193    help_gather.setComponentOrientation(Dictionary.getOrientation());
     194       
    175195    help_enrich = new JMenuItem(Dictionary.get("GUI.Enrich"), BLANK_ICON);
    176196    help_enrich.addActionListener(Gatherer.g_man);
    177    
     197    help_enrich.setComponentOrientation(Dictionary.getOrientation());
     198       
    178199    help_design = new JMenuItem(Dictionary.get("GUI.Design"), BLANK_ICON);
    179200    help_design.addActionListener(Gatherer.g_man);
    180    
     201    help_design.setComponentOrientation(Dictionary.getOrientation());
     202       
    181203    help_create = new JMenuItem(Dictionary.get("GUI.Create"), BLANK_ICON);
    182204    help_create.addActionListener(Gatherer.g_man);
    183    
     205    help_create.setComponentOrientation(Dictionary.getOrientation());
     206       
    184207    help_format = new JMenuItem(Dictionary.get("GUI.Format"), BLANK_ICON);
    185208    help_format.addActionListener(Gatherer.g_man);
    186    
     209    help_format.setComponentOrientation(Dictionary.getOrientation());
     210       
    187211    help_about = new JMenuItem(Dictionary.get("Menu.Help_About"));
    188212    help_about.addActionListener(Gatherer.g_man);
    189    
     213    help_about.setComponentOrientation(Dictionary.getOrientation());
     214       
    190215    // Layout (help menu)
    191216    help.add(help_general);
Note: See TracChangeset for help on using the changeset viewer.