Changeset 18370

Show
Ignore:
Timestamp:
12.01.2009 13:04:29 (10 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.

Location:
gli/trunk/src/org/greenstone/gatherer
Files:
45 modified

Legend:

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

    r12295 r18370  
    3737package org.greenstone.gatherer; 
    3838 
     39import java.awt.ComponentOrientation; 
    3940import javax.swing.plaf.FontUIResource; 
    4041import java.util.HashMap; 
     
    7475    Loaded from a file named "dictionary<I>locale</I>.properties. */ 
    7576    static private ResourceBundle dictionary = null; 
    76  
    77  
     77    /** language orientation property */ 
     78    static private ComponentOrientation orientation = null; 
     79        
    7880    public Dictionary(Locale locale, FontUIResource font) 
    7981    { 
     
    8486    this.locale = ((locale == null) ? Locale.getDefault() : locale); 
    8587    this.dictionary = ResourceBundle.getBundle("dictionary", this.locale); 
    86     } 
    87  
    88  
     88        if (this.get("Component.Orientation").equals("RTL")){ 
     89            this.orientation = ComponentOrientation.RIGHT_TO_LEFT; 
     90        } else { 
     91            this.orientation = ComponentOrientation.LEFT_TO_RIGHT; 
     92        }       
     93         
     94    } 
     95     
    8996    /** Retrieve the two letter code of the current language we are using, according to the stored locale. 
    9097     * @return A <strong>String</strong> containing the two letter ISO639 language code. 
     
    94101    return locale.getLanguage(); 
    95102    } 
    96  
    97  
     103    /** returns the Components Orientation for use with right to left languages 
     104     * @return A <strong>ComponentOrientation</strong> with the current  
     105     dictionary's language orientation. 
     106     * by  Amin Hejazi  
     107    */ 
     108    static public ComponentOrientation getOrientation() 
     109    { 
     110       return orientation; 
     111    } 
     112     
    98113    static public String get(String key) 
    99114    { 
    100115    return get(key, (String[]) null); 
    101116    } 
    102  
    103117 
    104118    static public String get(String key, String arg) 
  • gli/trunk/src/org/greenstone/gatherer/gui/AboutDialog.java

    r17916 r18370  
    6868    this.self = this; 
    6969    setSize(SIZE); 
    70            
     70        this.setComponentOrientation(Dictionary.getOrientation());         
    7171    JPanel content_pane = (JPanel) getContentPane(); 
     72        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
     73         
    7274    JPanel upper_pane = new JPanel(); 
    73  
     75        upper_pane.setComponentOrientation(Dictionary.getOrientation()); 
     76         
    7477    String gmedium_image = "gatherer_medium.gif"; 
    7578    if (Configuration.fedora_info.isActive()) { 
     
    8083    ImageIcon scaled_icon = new ImageIcon(icon.getImage().getScaledInstance(ICON_SIZE, ICON_SIZE, Image.SCALE_DEFAULT)); 
    8184    JLabel icon_label = new JLabel(scaled_icon); 
    82     JPanel title_pane = new JPanel(); 
    83     JLabel title_one_label = new JLabel(Dictionary.get("AboutDialog.Title_One")); 
    84     JLabel title_two_label = new JLabel(Gatherer.PROGRAM_NAME + " " + Gatherer.PROGRAM_VERSION + " " + Dictionary.get("AboutDialog.Date")); 
    85     JLabel title_three_label = new JLabel(Dictionary.get("AboutDialog.Title_Two")); 
    86     JLabel copyright_label = new JLabel(Dictionary.get("AboutDialog.Copyright")); 
    87     JLabel gpl_label = new JLabel(Dictionary.get("AboutDialog.Copyright_Two")); 
    88      
     85    icon_label.setComponentOrientation(Dictionary.getOrientation()); 
     86         
     87        JPanel title_pane = new JPanel(); 
     88    title_pane.setComponentOrientation(Dictionary.getOrientation()); 
     89         
     90        JLabel title_one_label = new JLabel(Dictionary.get("AboutDialog.Title_One")); 
     91    title_one_label.setComponentOrientation(Dictionary.getOrientation()); 
     92        JLabel title_two_label = new JLabel(Gatherer.PROGRAM_NAME + " " + Gatherer.PROGRAM_VERSION + " " + Dictionary.get("AboutDialog.Date")); 
     93        title_two_label.setComponentOrientation(Dictionary.getOrientation()); 
     94        JLabel title_three_label = new JLabel(Dictionary.get("AboutDialog.Title_Two")); 
     95    title_three_label.setComponentOrientation(Dictionary.getOrientation()); 
     96        JLabel copyright_label = new JLabel(Dictionary.get("AboutDialog.Copyright")); 
     97    copyright_label.setComponentOrientation(Dictionary.getOrientation()); 
     98        JLabel gpl_label = new JLabel(Dictionary.get("AboutDialog.Copyright_Two")); 
     99        gpl_label.setComponentOrientation(Dictionary.getOrientation()); 
     100         
    89101    JTextArea text = new JTextArea(); 
     102        text.setComponentOrientation(Dictionary.getOrientation()); 
    90103    text.setLineWrap(true); 
    91104    text.setWrapStyleWord(true); 
    92  
     105         
     106         
    93107    JPanel button_pane = new JPanel(); 
     108        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    94109    close_button = new GLIButton(Dictionary.get("General.Close"), Dictionary.get("General.Close_Tooltip")); 
    95110     
     
    109124    upper_pane.setBorder(BorderFactory.createEmptyBorder(0,0,5,0)); 
    110125    upper_pane.setLayout(new BorderLayout()); 
    111     upper_pane.add(icon_label, BorderLayout.WEST); 
     126    upper_pane.add(icon_label, BorderLayout.LINE_START); 
    112127    upper_pane.add(title_pane, BorderLayout.CENTER); 
    113128 
    114129    button_pane.setBorder(BorderFactory.createEmptyBorder(5,0,0,0)); 
    115130    button_pane.setLayout(new BorderLayout()); 
    116     button_pane.add(close_button, BorderLayout.EAST); 
     131    button_pane.add(close_button, BorderLayout.LINE_END); 
    117132 
    118133    content_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 
  • gli/trunk/src/org/greenstone/gatherer/gui/BaseConfigPane.java

    r12805 r18370  
    7575    DebugStream.println("BaseConfigPane: Main GUI components created."); 
    7676    // Creation 
     77        this.setComponentOrientation(Dictionary.getOrientation()); 
    7778    tree_pane = new JPanel(); 
    78  
     79        tree_pane.setComponentOrientation(Dictionary.getOrientation()); 
     80         
    7981    tree = new DesignTree(); 
    80      
     82    tree.setComponentOrientation(Dictionary.getOrientation()); 
    8183    // Connect 
    8284    tree.addTreeSelectionListener(new TreeListener()); 
     
    8587    tree_pane.setLayout(new BorderLayout()); 
    8688    tree_pane.setPreferredSize(TREE_SIZE); 
    87     tree_pane.add(new JScrollPane(tree), BorderLayout.CENTER); 
     89        JScrollPane scrol_tmp; 
     90        scrol_tmp = new JScrollPane(tree); 
     91        scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     92    tree_pane.add(scrol_tmp, BorderLayout.CENTER); 
    8893    setLayout(new BorderLayout()); 
    8994    setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 
    9095     
    91     add(tree_pane, BorderLayout.WEST); 
     96    add(tree_pane, BorderLayout.LINE_START); 
    9297 
    9398 
  • gli/trunk/src/org/greenstone/gatherer/gui/CreatePane.java

    r17940 r18370  
    167167     */ 
    168168    public CreatePane() { 
     169        this.setComponentOrientation(Dictionary.getOrientation()); 
    169170    log_textarea = new JTextArea(); 
    170171    log_scroll = new JScrollPane(log_textarea); 
    171  
     172         
    172173    // Create components 
    173174    card_layout = new CardLayout(); 
    174175    // Control Pane 
    175176    control_pane = new JPanel(); 
     177        control_pane.setComponentOrientation(Dictionary.getOrientation()); 
    176178    tree = new OptionTree(); 
     179        tree.setComponentOrientation(Dictionary.getOrientation()); 
    177180    button_pane = new JPanel(); 
     181        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    178182 
    179183    // Progress Pane 
    180184    progress_pane = new JPanel(); // One owner of the bar component 
     185        progress_pane.setComponentOrientation(Dictionary.getOrientation()); 
    181186    bar_area = new JPanel(); // This component will be shared about 
     187        bar_area.setComponentOrientation(Dictionary.getOrientation()); 
    182188 
    183189    progress_import_label = new JLabel(Dictionary.get("CreatePane.Import_Progress")); 
    184      
     190    progress_import_label.setComponentOrientation(Dictionary.getOrientation()); 
     191         
    185192    import_monitor = new GImportProgressMonitor(); 
    186193    Gatherer.c_man.registerImportMonitor(import_monitor); 
    187194 
    188195    progress_build_label = new JLabel(Dictionary.get("CreatePane.Build_Progress")); 
    189      
     196    progress_build_label.setComponentOrientation(Dictionary.getOrientation()); 
     197         
    190198    build_monitor = new GBuildProgressMonitor(import_monitor.getSharedProgress()); 
    191199    Gatherer.c_man.registerBuildMonitor(build_monitor); 
     
    202210    sbutton_panel = new JPanel(); 
    203211    sinner_panel = new JPanel(); 
    204  
     212         
     213        slower_panel.setComponentOrientation(Dictionary.getOrientation()); 
     214        sbutton_panel.setComponentOrientation(Dictionary.getOrientation()); 
     215        sinner_panel.setComponentOrientation(Dictionary.getOrientation()); 
     216         
    205217    //Radio buttons 
    206218    incremental_build_radio_button = new JRadioButton(Dictionary.get("CreatePane.Minimal_Build")); 
     219        incremental_build_radio_button.setComponentOrientation(Dictionary.getOrientation()); 
    207220    incremental_build_radio_button.setToolTipText(Dictionary.get("CreatePane.Minimal_Build_Tooltip")); 
    208221    full_build_radio_button = new JRadioButton(Dictionary.get("CreatePane.Full_Build")); 
     222        full_build_radio_button.setComponentOrientation(Dictionary.getOrientation()); 
    209223    full_build_radio_button.setToolTipText(Dictionary.get("CreatePane.Full_Build_Tooltip")); 
    210224    sincremental_build_radio_button = new JRadioButton(Dictionary.get("CreatePane.Minimal_Build")); 
     225        sincremental_build_radio_button.setComponentOrientation(Dictionary.getOrientation()); 
    211226    sincremental_build_radio_button.setToolTipText(Dictionary.get("CreatePane.Minimal_Build_Tooltip")); 
    212227    sfull_build_radio_button = new JRadioButton(Dictionary.get("CreatePane.Full_Build")); 
     228        sfull_build_radio_button.setComponentOrientation(Dictionary.getOrientation()); 
    213229    sfull_build_radio_button.setToolTipText(Dictionary.get("CreatePane.Full_Build_Tooltip")); 
    214230 
     
    283299    sbuild_type_group.add(sfull_build_radio_button); 
    284300    JPanel build_type_pane = new JPanel(new GridLayout(2,1)); 
     301        build_type_pane.setComponentOrientation(Dictionary.getOrientation()); 
    285302    build_type_pane.add(full_build_radio_button); 
    286303    build_type_pane.add(incremental_build_radio_button); 
    287304    JPanel sbuild_type_pane = new JPanel(new GridLayout(2,1)); 
     305        sbuild_type_pane.setComponentOrientation(Dictionary.getOrientation()); 
    288306    sbuild_type_pane.add(sfull_build_radio_button); 
    289307    sbuild_type_pane.add(sincremental_build_radio_button); 
     
    293311    // Build control_pane 
    294312    JPanel left = new JPanel(); 
     313        left.setComponentOrientation(Dictionary.getOrientation()); 
    295314    left.setBorder(BorderFactory.createEmptyBorder(0,5,5,5)); 
    296315    left.setLayout(new BorderLayout()); 
     
    300319 
    301320    right = new JPanel(); 
     321        right.setComponentOrientation(Dictionary.getOrientation()); 
    302322    right.setBorder(BorderFactory.createEmptyBorder(0,0,5,5)); 
    303323    right.setLayout(new BorderLayout()); 
    304324 
    305325    JPanel options_area = new JPanel(); 
     326        options_area.setComponentOrientation(Dictionary.getOrientation()); 
    306327    options_area.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(5,5,5,5), BorderFactory.createTitledBorder(Dictionary.get("CreatePane.Options_Title")))); 
    307328    options_area.setLayout(new BorderLayout()); 
    308     options_area.add(left, BorderLayout.WEST); 
     329    options_area.add(left, BorderLayout.LINE_START); 
    309330    options_area.add(right, BorderLayout.CENTER); 
    310331 
    311332    button_pane = new JPanel(); 
     333        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    312334    button_pane.setBorder(BorderFactory.createEmptyBorder(5,10,10,10)); 
    313335    button_pane.setLayout(new GridLayout(1,4)); 
     
    322344    // Build progress_pane 
    323345    JPanel labels_pane = new JPanel(); 
     346        labels_pane.setComponentOrientation(Dictionary.getOrientation()); 
    324347    labels_pane.setLayout(new GridLayout(2,1,0,5)); 
    325348    labels_pane.add(progress_import_label); 
     
    327350 
    328351    JPanel monitors_pane = new JPanel(); 
     352        monitors_pane.setComponentOrientation(Dictionary.getOrientation()); 
    329353    monitors_pane.setLayout(new GridLayout(2,1,0,5)); 
    330354    monitors_pane.add(import_monitor.getProgress()); 
     
    333357    bar_area.setBorder(BorderFactory.createEmptyBorder(10,10,5,10)); 
    334358    bar_area.setLayout(new BorderLayout(5,5)); 
    335     bar_area.add(labels_pane, BorderLayout.WEST); 
     359    bar_area.add(labels_pane, BorderLayout.LINE_START); 
    336360    bar_area.add(monitors_pane, BorderLayout.CENTER); 
    337361 
     
    351375 
    352376    JPanel simple_bar_area = new JPanel(new GridLayout(2,1)); 
     377        simple_bar_area.setComponentOrientation(Dictionary.getOrientation()); 
    353378    simple_bar_area.setBorder(BorderFactory.createEmptyBorder(0,5,0,0)); 
    354379    simple_bar_area.add(import_monitor.getSharedProgress()); 
     
    357382    sinner_panel.setBorder(BorderFactory.createEmptyBorder(5,0,5,0)); 
    358383    sinner_panel.setLayout(new BorderLayout()); 
    359     sinner_panel.add(sbuild_type_pane, BorderLayout.WEST); 
     384    sinner_panel.add(sbuild_type_pane, BorderLayout.LINE_START); 
    360385    //sinner_panel.add(full_build_radio_button, BorderLayout.WEST); 
    361386    sinner_panel.add(simple_bar_area, BorderLayout.CENTER); 
     
    371396        sargument_configuration_panel = new JPanel(); 
    372397    } 
     398        sargument_configuration_panel.setComponentOrientation(Dictionary.getOrientation()); 
    373399    sargument_configuration_scroll = new JScrollPane(sargument_configuration_panel); 
    374400    sargument_configuration_scroll.setPreferredSize(ARGUMENT_SIZE); 
    375      
     401        sargument_configuration_scroll.setComponentOrientation(Dictionary.getOrientation()); 
     402         
    376403    slower_panel.setLayout(new BorderLayout()); 
    377404    slower_panel.add(sinner_panel, BorderLayout.NORTH); 
     
    381408     
    382409    simple_panel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, sargument_configuration_scroll, slower_panel); 
     410        simple_panel.setComponentOrientation(Dictionary.getOrientation()); 
    383411    // Main pane 
    384412    main_pane = new JPanel(card_layout); 
     413        main_pane.setComponentOrientation(Dictionary.getOrientation()); 
    385414    if(current_mode < THRESHOLD) { // Simple mode - add first 
    386415        main_pane.add(simple_panel, SIMPLE); 
     
    494523        } 
    495524        sargument_configuration_scroll = new JScrollPane(sargument_configuration_panel); 
     525            sargument_configuration_panel.setComponentOrientation(Dictionary.getOrientation()); 
     526            sargument_configuration_scroll.setComponentOrientation(Dictionary.getOrientation()); 
    496527        sargument_configuration_scroll.setPreferredSize(ARGUMENT_SIZE); 
    497528        simple_panel.setTopComponent(sargument_configuration_scroll); 
     
    634665        //} 
    635666        sargument_configuration_scroll = new JScrollPane(sargument_configuration_panel); 
     667            sargument_configuration_scroll.setComponentOrientation(Dictionary.getOrientation()); 
    636668        sargument_configuration_scroll.setPreferredSize(ARGUMENT_SIZE); 
    637669        simple_panel.setTopComponent(sargument_configuration_scroll); 
     
    913945    public OptionTree() { 
    914946        super(); 
    915  
     947            this.setComponentOrientation(Dictionary.getOrientation()); 
    916948        ToolTipManager.sharedInstance().registerComponent(this); 
    917949        addTreeSelectionListener(this); 
  • gli/trunk/src/org/greenstone/gatherer/gui/CreateShortcutPrompt.java

    r12119 r18370  
    5353    { 
    5454    super(Gatherer.g_man); 
    55  
     55        this.setComponentOrientation(Dictionary.getOrientation()); 
    5656    setModal(true); 
    5757    setSize(DIALOG_SIZE); 
     
    6060    // Creation 
    6161    JPanel content_pane = (JPanel) getContentPane(); 
     62        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
    6263    JPanel center_pane = new JPanel(); 
     64        center_pane.setComponentOrientation(Dictionary.getOrientation()); 
    6365    JPanel labels_pane = new JPanel(); 
     66        labels_pane.setComponentOrientation(Dictionary.getOrientation()); 
    6467    JPanel fields_pane = new JPanel(); 
     68        fields_pane.setComponentOrientation(Dictionary.getOrientation()); 
    6569 
    6670    JLabel file_label = new JLabel(Dictionary.get("MappingPrompt.File")); 
    67     JLabel file_field = new JLabel(file.getAbsolutePath()); 
    68  
     71    file_label.setComponentOrientation(Dictionary.getOrientation()); 
     72        JLabel file_field = new JLabel(file.getAbsolutePath()); 
     73        file_field.setComponentOrientation(Dictionary.getOrientation()); 
     74         
    6975    JLabel name_label = new JLabel(Dictionary.get("MappingPrompt.Name")); 
    70     name_field = new JTextField(file.getName()); 
    71  
     76    name_label.setComponentOrientation(Dictionary.getOrientation());                 
     77        name_field = new JTextField(file.getName()); 
     78        name_field.setComponentOrientation(Dictionary.getOrientation()); 
     79         
    7280    JPanel button_pane = new JPanel(); 
     81        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    7382    ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip")); 
    7483    ok_button.setEnabled(name_field.getText().length() > 0); 
     
    91100    center_pane.setBorder(BorderFactory.createEmptyBorder(0,0,5,0)); 
    92101    center_pane.setLayout(new BorderLayout(5,0)); 
    93     center_pane.add(labels_pane, BorderLayout.WEST); 
     102    center_pane.add(labels_pane, BorderLayout.LINE_START); 
    94103    center_pane.add(fields_pane, BorderLayout.CENTER); 
    95104 
  • gli/trunk/src/org/greenstone/gatherer/gui/DeleteCollectionPrompt.java

    r15156 r18370  
    9292    super(Gatherer.g_man); 
    9393    close_button = new GLIButton(Dictionary.get("General.Close"), Dictionary.get("General.Close_Tooltip")); 
    94      
     94    this.setComponentOrientation(Dictionary.getOrientation()); 
    9595    confirmation = new JCheckBox(Dictionary.get("DeleteCollectionPrompt.Confirm_Delete")); 
    96     details = new JTextArea(Dictionary.get("DeleteCollectionPrompt.No_Collection")); 
     96    confirmation.setComponentOrientation(Dictionary.getOrientation()); 
     97        details = new JTextArea(Dictionary.get("DeleteCollectionPrompt.No_Collection")); 
     98        details.setComponentOrientation(Dictionary.getOrientation()); 
    9799    details.setEditable(false); 
    98100    details_label = new JLabel(Dictionary.get("DeleteCollectionPrompt.Collection_Details")); 
    99  
     101        details_label.setComponentOrientation(Dictionary.getOrientation()); 
     102         
    100103    list = new JList(); 
     104        list.setComponentOrientation(Dictionary.getOrientation()); 
    101105    list_label = new JLabel(Dictionary.get("DeleteCollectionPrompt.Collection_List")); 
    102      
     106    list_label.setComponentOrientation(Dictionary.getOrientation()); 
     107         
    103108    list_model = new DefaultListModel(); 
    104109    ok_button = new GLIButton(Dictionary.get("DeleteCollectionPrompt.Delete"), Dictionary.get("DeleteCollectionPrompt.Delete_Tooltip")); 
     
    107112    setModal(true); 
    108113    setSize(SIZE); 
    109     setTitle(Dictionary.get("DeleteCollectionPrompt.Title")); 
    110      
     114    setTitle(Dictionary.get("DeleteCollectionPrompt.Title"));            
     115         
    111116    setJMenuBar(new SimpleMenuBar("deletingcollections"));  
    112117    close_button.addActionListener(new CloseButtonListener()); 
     
    121126    ok_button.setEnabled(false); 
    122127    scanForCollections(); 
     128         
    123129    } 
    124130 
     
    140146    public boolean display() { 
    141147    // Central pane 
     148        JScrollPane scrol_tmp; 
    142149    JPanel list_pane = new JPanel(new BorderLayout()); 
     150        list_pane.setComponentOrientation(Dictionary.getOrientation()); 
    143151    list_pane.add(list_label, BorderLayout.NORTH); 
    144     list_pane.add(new JScrollPane(list), BorderLayout.CENTER); 
     152        scrol_tmp = new JScrollPane(list); 
     153        scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     154    list_pane.add(scrol_tmp, BorderLayout.CENTER); 
    145155    list_pane.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0)); 
    146156 
    147157    JPanel details_pane = new JPanel(new BorderLayout()); 
     158        details_pane.setComponentOrientation(Dictionary.getOrientation()); 
    148159    details_pane.add(details_label, BorderLayout.NORTH); 
    149     details_pane.add(new JScrollPane(details), BorderLayout.CENTER); 
     160        scrol_tmp = new JScrollPane(details); 
     161        scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     162    details_pane.add(scrol_tmp, BorderLayout.CENTER); 
    150163    details_pane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); 
    151164 
    152165    JPanel central_pane = new JPanel(new GridLayout(2, 1)); 
     166        central_pane.setComponentOrientation(Dictionary.getOrientation()); 
    153167    central_pane.add(list_pane); 
    154168    central_pane.add(details_pane); 
     
    157171    // Lower pane 
    158172    JPanel confirmation_pane = new JPanel(new BorderLayout()); 
     173        confirmation_pane.setComponentOrientation(Dictionary.getOrientation()); 
    159174    confirmation_pane.add(confirmation, BorderLayout.CENTER); 
    160175    confirmation_pane.setBorder(BorderFactory.createEmptyBorder(0,0,5,0)); 
    161176 
    162177    JPanel button_pane = new JPanel(new GridLayout(1, 2)); 
     178        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    163179    button_pane.add(ok_button); 
    164180    button_pane.add(close_button); 
     
    166182 
    167183    JPanel lower_pane = new JPanel(new BorderLayout()); 
     184        lower_pane.setComponentOrientation(Dictionary.getOrientation()); 
    168185    lower_pane.add(confirmation_pane, BorderLayout.NORTH); 
    169186    lower_pane.add(button_pane, BorderLayout.SOUTH); 
     
    172189    // Final. 
    173190    JPanel content_pane = (JPanel)this.getContentPane(); 
     191        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
    174192    content_pane.setLayout(new BorderLayout()); 
    175193    content_pane.add(central_pane, BorderLayout.CENTER); 
  • gli/trunk/src/org/greenstone/gatherer/gui/DesignPane.java

    r14974 r18370  
    3737package org.greenstone.gatherer.gui; 
    3838 
     39import org.greenstone.gatherer.Dictionary; 
    3940import org.greenstone.gatherer.cdm.CollectionDesignManager; 
    4041import org.greenstone.gatherer.cdm.Control; 
  • gli/trunk/src/org/greenstone/gatherer/gui/DesignPaneHeader.java

    r12119 r18370  
    5555    public DesignPaneHeader(String label_key, String help_key) 
    5656    { 
     57        this.setComponentOrientation(Dictionary.getOrientation()); 
    5758    JLabel title_label = new JLabel("<HTML><STRONG><FONT FACE={FONT} COLOR=Black SIZE=5>" + Dictionary.get(label_key) + "</FONT></STRONG></HTML>"); 
    58  
     59        title_label.setComponentOrientation(Dictionary.getOrientation()); 
     60         
    5961    JPanel title_pane = new JPanel(); 
    6062    title_pane.setBorder(BorderFactory.createEmptyBorder(0,0,0,5)); 
     
    6264    title_pane.add(title_label, BorderLayout.CENTER); 
    6365    title_pane.add(new JSeparator(), BorderLayout.SOUTH); 
    64  
     66        title_pane.setComponentOrientation(Dictionary.getOrientation()); 
     67         
    6568    GLIButton help_button = new GLIButton(Dictionary.get("CDM.HelpButton"), Dictionary.get("CDM.HelpButton_Tooltip")); 
    6669    this.help_key_name = help_key; 
     
    7578    setLayout(new BorderLayout()); 
    7679    add(title_pane, BorderLayout.CENTER); 
    77     add(help_button, BorderLayout.EAST); 
     80    add(help_button, BorderLayout.LINE_END); 
    7881    } 
    7982} 
  • gli/trunk/src/org/greenstone/gatherer/gui/DownloadPane.java

    r17651 r18370  
    9393    public DownloadPane() { 
    9494    super(); 
    95  
     95        JScrollPane scrol_tmp; 
     96        this.setComponentOrientation(Dictionary.getOrientation()); 
    9697    // TODO: Download the WDownload and the download panel fixed!! 
    9798        getter = new DownloadScrollPane(); 
    9899        getter.start(); 
    99     list_scroll = getter.getDownloadJobList(); 
    100  
     100    list_scroll = getter.getDownloadJobList();       
     101        list_scroll.setComponentOrientation(Dictionary.getOrientation()); 
    101102    // TODO should use Vector to store all loaded downloads!! 
    102103    String lang = Configuration.getLanguage(); 
     
    110111    // Creation 
    111112    tree = new DesignTree(); 
     113        tree.setComponentOrientation(Dictionary.getOrientation()); 
    112114    options_pane = new JPanel(); 
    113  
     115        options_pane.setComponentOrientation(Dictionary.getOrientation()); 
    114116     
    115117    JButton clear_cache_button = new GLIButton(Dictionary.get("Mirroring.ClearCache"), Dictionary.get("Mirroring.ClearCache_Tooltip")); 
     
    139141    // Add to Panel 
    140142    JPanel button_pane = new JPanel(); 
     143        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    141144    button_pane.setLayout(new FlowLayout(FlowLayout.CENTER,20,5)); 
    142145    button_pane.setBorder(BorderFactory.createEtchedBorder()); 
     
    147150 
    148151    JPanel tree_pane = new JPanel(); 
     152        tree_pane.setComponentOrientation(Dictionary.getOrientation()); 
    149153    tree_pane.setLayout(new BorderLayout()); 
    150         tree_pane.add(new JScrollPane(tree), BorderLayout.CENTER); 
     154        scrol_tmp = new JScrollPane(tree); 
     155        scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     156        tree_pane.add(scrol_tmp, BorderLayout.CENTER); 
    151157    tree_pane.setPreferredSize(TREE_SIZE); 
    152158  
     
    158164 
    159165    JScrollPane options_scroll_pane = new JScrollPane(options_pane); 
     166        options_scroll_pane.setComponentOrientation(Dictionary.getOrientation()); 
    160167    JSplitPane mode_pane = new JSplitPane(); 
     168        mode_pane.setComponentOrientation(Dictionary.getOrientation()); 
    161169    mode_pane.setBorder(BorderFactory.createEmptyBorder(0,0,0,0)); 
    162     mode_pane.add(tree_pane,JSplitPane.LEFT); 
    163     mode_pane.add(options_scroll_pane,JSplitPane.RIGHT); 
    164     mode_pane.setDividerLocation(TREE_SIZE.width); 
     170        if (Dictionary.getOrientation().isLeftToRight()){ 
     171            mode_pane.add(tree_pane,JSplitPane.LEFT); 
     172            mode_pane.add(options_scroll_pane,JSplitPane.RIGHT);  
     173            mode_pane.setDividerLocation(TREE_SIZE.width); 
     174        }else{ 
     175            mode_pane.add(tree_pane,JSplitPane.RIGHT); 
     176            mode_pane.add(options_scroll_pane,JSplitPane.LEFT); 
     177            mode_pane.setDividerLocation(1); 
     178        } 
     179         
    165180     
    166181    JPanel edit_pane = new JPanel(); 
     182        edit_pane.setComponentOrientation(Dictionary.getOrientation()); 
    167183    edit_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(2,0,0,0), BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder("Download Setting"), BorderFactory.createEmptyBorder(2,2,2,2)))); 
    168184    edit_pane.setLayout(new BorderLayout()); 
     
    188204    private void addHeader(String name, Color color, JPanel target_pane) { 
    189205    JPanel header = new JPanel(); 
     206        header.setComponentOrientation(Dictionary.getOrientation()); 
    190207    header.setBackground(color); 
    191208    JPanel inner_pane = new JPanel(); 
     209        inner_pane.setComponentOrientation(Dictionary.getOrientation()); 
    192210    inner_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(5,5,5,5), BorderFactory.createRaisedBevelBorder())); 
    193211    inner_pane.setBackground(color); 
    194212    JLabel header_label = new JLabel("<html><strong>" + name + "</strong></html>"); 
     213        header_label.setComponentOrientation(Dictionary.getOrientation()); 
    195214    header_label.setBackground(Configuration.getColor("coloring.collection_heading_background", false)); 
    196215    header_label.setHorizontalAlignment(JLabel.CENTER); 
     
    353372    /** Behaviour Functions */ 
    354373    public void afterDisplay() { 
    355     ready = true; 
     374    ready = true;         
    356375    } 
    357376 
  • gli/trunk/src/org/greenstone/gatherer/gui/EditorDialog.java

    r12119 r18370  
    6767    public EditorDialog() { 
    6868    super(Gatherer.g_man); 
     69        this.setComponentOrientation(Dictionary.getOrientation()); 
    6970    } 
    7071 
     
    9495    // Create 
    9596    text = new JTextArea(value); 
     97        text.setComponentOrientation(Dictionary.getOrientation()); 
    9698    text.setCaretPosition(value.length()); 
    9799    text.setEditable(editable); 
     
    115117    // Layout 
    116118    JPanel button_pane = new JPanel(); 
     119        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    117120    button_pane.setLayout(new GridLayout(1,2)); 
    118121    if(editable) { 
     
    126129           
    127130    JPanel content_pane = (JPanel) getContentPane(); 
     131        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
    128132    content_pane.setLayout(new BorderLayout()); 
    129     content_pane.add(new JScrollPane(text), BorderLayout.CENTER); 
     133        JScrollPane scrol_tmp; 
     134        scrol_tmp = new JScrollPane(text); 
     135        scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     136    content_pane.add(scrol_tmp, BorderLayout.CENTER); 
    130137    content_pane.add(button_pane, BorderLayout.SOUTH); 
    131138           
  • gli/trunk/src/org/greenstone/gatherer/gui/EmailField.java

    r4939 r18370  
    66import javax.swing.event.*; 
    77import javax.swing.text.*; 
     8import org.greenstone.gatherer.Dictionary; 
    89 
    910public class EmailField 
     
    1920    public EmailField(Color invalid_background) { 
    2021    super(); 
     22        this.setComponentOrientation(Dictionary.getOrientation()); 
    2123    this.invalid_background = invalid_background; 
    2224    } 
  • gli/trunk/src/org/greenstone/gatherer/gui/EnrichPane.java

    r18199 r18370  
    8383    public EnrichPane() 
    8484    { 
    85     // Create the metadata value tree pane 
    86     metadata_value_tree_pane = new MetadataValueTreePane(); 
     85    this.setComponentOrientation(Dictionary.getOrientation()); 
     86        // Create the metadata value tree pane 
     87    metadata_value_tree_pane = new MetadataValueTreePane();         
    8788    metadata_value_tree_pane.addMetadataValueTreeSelectionListener(new MetadataValueTreeSelectionListener()); 
    8889 
    8990    // Create metadata value table pane 
    90     metadata_value_table_pane = new MetadataValueTablePane(); 
     91    metadata_value_table_pane = new MetadataValueTablePane();       
    9192    metadata_value_table_pane.addMetadataValueTableListSelectionListener(new MetadataValueTableListSelectionListener()); 
    9293    metadata_value_table_pane.addMetadataValueTableMouseListener(new MetadataValueTableMouseListener()); 
     
    100101    public void afterDisplay() 
    101102    { 
    102     external_split.setDividerLocation(0.3); 
     103        if (Dictionary.getOrientation().isLeftToRight()){ 
     104            external_split.setDividerLocation(0.3); 
     105        }else{ 
     106            external_split.setDividerLocation(0.7); 
     107        } 
    103108    } 
    104109 
     
    112117    { 
    113118    JPanel left_hand_pane = new JPanel(new BorderLayout()); 
     119        left_hand_pane.setComponentOrientation(Dictionary.getOrientation()); 
    114120    GLIButton metadata_set_button = new GLIButton(Dictionary.get("EnrichPane.ManageMetadataSets"), Dictionary.get("EnrichPane.ManageMetadataSets_Tooltip")); 
    115121    metadata_set_button.addActionListener(new ActionListener() { 
     
    124130    // Collection Tree 
    125131    collection_pane = new JPanel(new BorderLayout()); 
     132     //   collection_pane.setComponentOrientation(Dictionary.getOrientation()); 
    126133    collection_pane.setMinimumSize(MINIMUM_SIZE); 
    127134    collection_pane.setPreferredSize(COLLECTION_TREE_SIZE); 
    128135 
    129136    collection_label = new JLabel(Dictionary.get("Collection.No_Collection")); 
     137        collection_label.setComponentOrientation(Dictionary.getOrientation()); 
    130138    collection_label.setOpaque(true); 
    131139 
    132140    collection_tree = Gatherer.c_man.getCollectionTree(); 
    133141    collection_tree.getSelectionModel().setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION); 
    134     collection_tree.addTreeSelectionListener(this); 
     142    collection_tree.addTreeSelectionListener(this);  
     143        collection_tree.setComponentOrientation(Dictionary.getOrientation()); 
    135144    collection_filter = collection_tree.getFilter(); 
    136  
    137145    external_split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); 
    138  
     146        external_split.setComponentOrientation(Dictionary.getOrientation()); 
    139147    // Layout 
    140148    collection_pane.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(3,3,3,3), BorderFactory.createLoweredBevelBorder())); 
    141149    collection_pane.setMinimumSize(MINIMUM_SIZE); 
    142150    collection_pane.setPreferredSize(new Dimension(Gatherer.g_man.getSize().width / 3, Gatherer.g_man.getSize().height)); 
    143  
     151        collection_pane.setComponentOrientation(Dictionary.getOrientation()); 
    144152    // Collection Pane 
    145153    collection_pane.add(collection_label, BorderLayout.NORTH); 
     
    148156    metadata_editing_pane.setBorder(BorderFactory.createEmptyBorder(0,5,5,5)); 
    149157    metadata_editing_pane.setDividerSize(8); 
    150  
     158        metadata_editing_pane.setComponentOrientation(Dictionary.getOrientation()); 
     159         
    151160    metadata_editing_pane.add(metadata_value_table_pane, JSplitPane.TOP); 
    152161    metadata_editing_pane.add(metadata_value_tree_pane, JSplitPane.BOTTOM); 
     
    155164    left_hand_pane.add(collection_pane, BorderLayout.CENTER); 
    156165    left_hand_pane.add(metadata_set_button, BorderLayout.SOUTH); 
    157     external_split.add(left_hand_pane, JSplitPane.LEFT); 
    158     external_split.add(metadata_editing_pane, JSplitPane.RIGHT); 
     166        if (Dictionary.getOrientation().isLeftToRight()){ 
     167            external_split.add(left_hand_pane, JSplitPane.LEFT); 
     168            external_split.add(metadata_editing_pane, JSplitPane.RIGHT); 
     169        }else{ 
     170            external_split.add(left_hand_pane, JSplitPane.RIGHT); 
     171            external_split.add(metadata_editing_pane, JSplitPane.LEFT); 
     172        } 
    159173 
    160174 
  • gli/trunk/src/org/greenstone/gatherer/gui/ExplodeMetadataDatabasePrompt.java

    r17612 r18370  
    8787    this.self = this; 
    8888    this.metadata_file = source_file; 
    89  
     89        this.setComponentOrientation(Dictionary.getOrientation()); 
    9090    // check that we actually have an explodable file 
    9191    ArrayList exp_plugins = CollectionDesignManager.plugin_manager.getExploderPlugins(source_file); 
     
    107107    // Creation 
    108108    JPanel content_pane = (JPanel) getContentPane(); 
     109        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
    109110    content_pane.setOpaque(true); 
    110111     
    111112    options_pane = new JPanel(); 
     113        options_pane.setComponentOrientation(Dictionary.getOrientation()); 
    112114    addScriptOptions(options_pane); 
    113115    JScrollPane middle_pane = new JScrollPane(options_pane); 
    114  
     116        middle_pane.setComponentOrientation(Dictionary.getOrientation()); 
     117         
    115118    JTextArea instructions_area = new JTextArea(Dictionary.get("ExplodeMetadataPrompt.Instructions")); 
    116     instructions_area.setEditable(false); 
     119    instructions_area.setComponentOrientation(Dictionary.getOrientation()); 
     120        instructions_area.setEditable(false); 
    117121    instructions_area.setLineWrap(true); 
    118122    instructions_area.setRows(5); 
     
    120124     
    121125    JPanel button_pane = new JPanel(); 
    122     JButton explode_button = new GLIButton(Dictionary.get("ExplodeMetadataPrompt.Explode"), Dictionary.get("ExplodeMetadataPrompt.Explode_Tooltip")); 
     126    button_pane.setComponentOrientation(Dictionary.getOrientation()); 
     127        JButton explode_button = new GLIButton(Dictionary.get("ExplodeMetadataPrompt.Explode"), Dictionary.get("ExplodeMetadataPrompt.Explode_Tooltip")); 
    123128    JButton cancel_button = new GLIButton(Dictionary.get("General.Cancel"), Dictionary.get("General.Cancel_Tooltip")); 
    124129     
  • gli/trunk/src/org/greenstone/gatherer/gui/ExportAsPrompt.java

    r17252 r18370  
    155155    public ExportAsPrompt() { 
    156156    super(Gatherer.g_man, true); 
    157      
     157    this.setComponentOrientation(Dictionary.getOrientation()); 
    158158    plugoutMap.clear();          
    159159    plugoutMap.put("DSpace","dublin-core.xml"); 
     
    168168    details_textarea = new JTextArea(Dictionary.get("DeleteCollectionPrompt.No_Collection")); 
    169169    details_textarea.setEditable(false); 
    170      
     170    details_textarea.setComponentOrientation(Dictionary.getOrientation()); 
     171         
    171172    details_label = new JLabel(Dictionary.get("DeleteCollectionPrompt.Collection_Details")); 
    172173     
     
    178179    instructions_textarea.setRows(4); 
    179180    instructions_textarea.setWrapStyleWord(true); 
    180      
     181    instructions_textarea.setComponentOrientation(Dictionary.getOrientation()); 
    181182              
    182183        
    183184        saveas_label = new JLabel(Dictionary.get("ExportAsPrompt.SaveAs") 
    184185); 
     186        saveas_label.setComponentOrientation(Dictionary.getOrientation()); 
    185187        //saveas_label.setPreferredSize(LABEL_SIZE); 
    186188         
     
    188190    saveas_combobox.setOpaque(false); 
    189191    saveas_combobox.setToolTipText(Dictionary.get("ExportAsPrompt.SaveAs_Tooltip")); 
    190          
     192        saveas_combobox.setComponentOrientation(Dictionary.getOrientation()); 
    191193 
    192194    // Add xml conversion feature 
     
    203205        convert_xml_checkbox1.setText(Dictionary.get("ExportAsPrompt.ApplyXSL","doc.xml")); 
    204206        convert_xml_checkbox1.setToolTipText(Dictionary.get("ExportAsPrompt.ApplyXSL_Tooltip")); 
     207        convert_xml_checkbox1.setComponentOrientation(Dictionary.getOrientation()); 
    205208         
    206209    convert_xml_checkbox2 = new JCheckBox(); 
    207210        convert_xml_checkbox2.setToolTipText(Dictionary.get("ExportAsPrompt.ApplyXSL_Tooltip")); 
    208  
    209  
     211        convert_xml_checkbox2.setComponentOrientation(Dictionary.getOrientation()); 
     212         
    210213        output_single_checkbox = new JCheckBox(); 
     214        output_single_checkbox.setComponentOrientation(Dictionary.getOrientation()); 
    211215    output_single_checkbox.setText(Dictionary.get("ExportAsPrompt.MARCXMLGroup")); 
    212216        output_single_checkbox.setToolTipText(Dictionary.get("ExportAsPrompt.MARCXMLGroup_Tooltip")); 
     
    214218 
    215219        mapping_xml_checkbox = new JCheckBox(); 
     220        mapping_xml_checkbox.setComponentOrientation(Dictionary.getOrientation()); 
    216221    mapping_xml_checkbox.setText(Dictionary.get("ExportAsPrompt.MappingXML")); 
    217222        mapping_xml_checkbox.setToolTipText(Dictionary.get("ExportAsPrompt.MappingXML_Tooltip")); 
    218223 
    219  
    220224        convert_xml_field1 = new JTextField(); 
     225        convert_xml_field1.setComponentOrientation(Dictionary.getOrientation()); 
    221226    convert_xml_field1.setEnabled(false); 
     227 
    222228    convert_xml_field2 = new JTextField(); 
     229        convert_xml_field2.setComponentOrientation(Dictionary.getOrientation()); 
    223230    convert_xml_field2.setEnabled(false); 
     231 
    224232    mapping_xml_field = new JTextField(); 
     233        mapping_xml_field.setComponentOrientation(Dictionary.getOrientation()); 
    225234    mapping_xml_field.setEnabled(false); 
    226235 
    227236        convert_xml_pane1 = new JPanel(new BorderLayout()); 
    228      
     237    convert_xml_pane1.setComponentOrientation(Dictionary.getOrientation());                 
     238         
    229239    convert_xml_pane2 = new JPanel(new BorderLayout()); 
    230  
     240        convert_xml_pane2.setComponentOrientation(Dictionary.getOrientation()); 
     241         
    231242    mapping_xml_pane = new JPanel(new BorderLayout()); 
    232  
     243        mapping_xml_pane.setComponentOrientation(Dictionary.getOrientation()); 
     244         
    233245    convert_xml_pane = new JPanel(new GridLayout(3,1)); 
    234  
     246        convert_xml_pane.setComponentOrientation(Dictionary.getOrientation()); 
     247         
    235248    all_collections = new ArrayList(); 
    236249    //list = new CheckList(true); 
    237250    list = new JList(getCollectionListModel()); 
    238251    list_label = new JLabel(Dictionary.get("DeleteCollectionPrompt.Collection_List")); 
    239      
     252    list_label.setComponentOrientation(Dictionary.getOrientation()); 
     253         
    240254    ok_button = new GLIButton(Dictionary.get("ExportAsPrompt.Export"), Dictionary.get("ExportAsPrompt.Export_Tooltip")); 
    241255     
    242256    title_field = new JTextField(); 
     257        title_field.setComponentOrientation(Dictionary.getOrientation()); 
    243258    title_field.setToolTipText(Dictionary.get("ExportAsPrompt.Export_Name_Tooltip")); 
    244259    title_label = new JLabel(Dictionary.get("ExportAsPrompt.Export_Name")); 
    245  
     260        title_label.setComponentOrientation(Dictionary.getOrientation()); 
     261         
    246262        folder_button = new GLIButton(Dictionary.get("ExportAsPrompt.Browse"),Dictionary.get("ExportAsPrompt.Browse_Tooltip")); 
    247263    folder_button.addActionListener(new FolderButtonListener()); 
     
    294310     * returns true if it has exported the collections that are currently selected */ 
    295311    public boolean display() { 
     312        JScrollPane scrol_tmp; 
    296313    // Top pane 
    297314    instructions_pane = new JPanel(new BorderLayout()); 
    298     instructions_pane.setBorder(BorderFactory.createEmptyBorder(0,0,5,5)); 
    299     instructions_pane.add(new JScrollPane(instructions_textarea), BorderLayout.CENTER); 
     315        instructions_pane.setComponentOrientation(Dictionary.getOrientation()); 
     316        instructions_pane.setBorder(BorderFactory.createEmptyBorder(0,0,5,5)); 
     317        scrol_tmp = new JScrollPane(instructions_textarea); 
     318        scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     319        instructions_pane.add(scrol_tmp, BorderLayout.CENTER); 
    300320     
    301321    title_label.setBorder(BorderFactory.createEmptyBorder(0,5,0,15)); 
    302322 
    303323    JPanel title_pane = new JPanel(new BorderLayout()); 
    304     title_pane.add(title_label, BorderLayout.WEST); 
     324        title_pane.setComponentOrientation(Dictionary.getOrientation()); 
     325    title_pane.add(title_label, BorderLayout.LINE_START); 
    305326    title_pane.add(title_field, BorderLayout.CENTER); 
    306         title_pane.add(folder_button, BorderLayout.EAST); 
     327        title_pane.add(folder_button, BorderLayout.LINE_END); 
    307328        //apply xsl pane 
    308329           
     
    312333    convert_xml_pane.removeAll(); 
    313334 
    314     convert_xml_pane1.add(convert_xml_checkbox1, BorderLayout.WEST); 
     335    convert_xml_pane1.add(convert_xml_checkbox1, BorderLayout.LINE_START); 
    315336    convert_xml_pane1.add(convert_xml_field1, BorderLayout.CENTER); 
    316     convert_xml_pane1.add(convert_xml_button1, BorderLayout.EAST); 
    317  
    318     convert_xml_pane2.add(convert_xml_checkbox2, BorderLayout.WEST); 
     337    convert_xml_pane1.add(convert_xml_button1, BorderLayout.LINE_END); 
     338 
     339    convert_xml_pane2.add(convert_xml_checkbox2, BorderLayout.LINE_START); 
    319340    convert_xml_pane2.add(convert_xml_field2, BorderLayout.CENTER); 
    320     convert_xml_pane2.add(convert_xml_button2, BorderLayout.EAST); 
     341    convert_xml_pane2.add(convert_xml_button2, BorderLayout.LINE_END); 
    321342       
    322     mapping_xml_pane.add(mapping_xml_checkbox, BorderLayout.WEST); 
     343    mapping_xml_pane.add(mapping_xml_checkbox, BorderLayout.LINE_START); 
    323344    mapping_xml_pane.add(mapping_xml_field, BorderLayout.CENTER); 
    324     mapping_xml_pane.add(convert_xml_button3, BorderLayout.EAST); 
     345    mapping_xml_pane.add(convert_xml_button3, BorderLayout.LINE_END); 
    325346 
    326347    convert_xml_pane.add(convert_xml_pane1); 
     
    332353        // Save as pane 
    333354    JPanel saveas_pane = new JPanel(new BorderLayout()); 
     355        saveas_pane.setComponentOrientation(Dictionary.getOrientation()); 
    334356    saveas_label.setBorder(BorderFactory.createEmptyBorder(0,5,0,15)); 
    335     saveas_pane.add(saveas_label, BorderLayout.WEST); 
     357    saveas_pane.add(saveas_label, BorderLayout.LINE_START); 
    336358    saveas_pane.add(saveas_combobox, BorderLayout.CENTER); 
    337359 
    338360        JPanel tmp_pane = new JPanel(new BorderLayout()); 
     361        tmp_pane.setComponentOrientation(Dictionary.getOrientation()); 
    339362        tmp_pane.add(saveas_pane, BorderLayout.NORTH); 
    340363    tmp_pane.add(title_pane, BorderLayout.CENTER); 
     
    346369    // Central pane 
    347370    JPanel list_pane = new JPanel(new BorderLayout()); 
     371        list_pane.setComponentOrientation(Dictionary.getOrientation()); 
    348372    list_pane.add(list_label, BorderLayout.NORTH); 
    349     list_pane.add(new JScrollPane(list), BorderLayout.CENTER); 
     373        scrol_tmp = new JScrollPane(list); 
     374        scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     375    list_pane.add(scrol_tmp, BorderLayout.CENTER); 
    350376    list_pane.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0)); 
    351377 
    352378    JPanel details_pane = new JPanel(new BorderLayout()); 
     379        details_pane.setComponentOrientation(Dictionary.getOrientation()); 
    353380    details_pane.add(details_label, BorderLayout.NORTH); 
    354     details_pane.add(new JScrollPane(details_textarea), BorderLayout.CENTER); 
     381        scrol_tmp = new JScrollPane(details_textarea); 
     382        scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     383    details_pane.add(scrol_tmp, BorderLayout.CENTER); 
    355384    details_pane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); 
    356385 
    357386    JPanel central_pane = new JPanel(new GridLayout(2, 1)); 
     387        central_pane.setComponentOrientation(Dictionary.getOrientation()); 
    358388    central_pane.add(list_pane); 
    359389    central_pane.add(details_pane); 
     
    362392    // Lower pane 
    363393    JPanel button_pane = new JPanel(new GridLayout(1, 2)); 
     394        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    364395    button_pane.add(ok_button); 
    365396    button_pane.add(cancel_button); 
     
    367398 
    368399    JPanel lower_pane = new JPanel(new BorderLayout()); 
     400        lower_pane.setComponentOrientation(Dictionary.getOrientation()); 
    369401    lower_pane.add(button_pane, BorderLayout.SOUTH); 
    370402    lower_pane.setBorder(BorderFactory.createEmptyBorder(0, 5, 5, 5)); 
     
    372404    // Final. 
    373405    JPanel content_pane = (JPanel)this.getContentPane(); 
     406        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
    374407    content_pane.setLayout(new BorderLayout()); 
    375408    content_pane.add(instructions_pane, BorderLayout.NORTH); 
  • gli/trunk/src/org/greenstone/gatherer/gui/FileAssociationDialog.java

    r12710 r18370  
    8181    this.file_association_manager = file_association_manager; 
    8282    this.self = this; 
    83            
     83        this.setComponentOrientation(Dictionary.getOrientation()); 
    8484    // Creation 
    8585    setModal(true); 
     
    109109    extension_field = new NonWhitespaceField(); 
    110110    extension_field.setToolTipText(Dictionary.get("FileAssociationDialog.Extension_Tooltip")); 
    111  
     111                 
    112112    JLabel command_label = new JLabel(Dictionary.get("FileAssociationDialog.Command")); 
    113113    JPanel command_pane = new JPanel(); 
     
    123123 
    124124 
    125     JPanel button_pane = new JPanel(); 
    126      
     125    JPanel button_pane = new JPanel();        
     126         
    127127    add_button = new GLIButton(Dictionary.get("FileAssociationDialog.Add"), Dictionary.get("FileAssociationDialog.Add_Tooltip")); 
    128128    add_button.setEnabled(false); 
     
    151151    extension_pane.setBorder(BorderFactory.createEmptyBorder(2,0,2,0)); 
    152152    extension_pane.setLayout(new BorderLayout(5,0)); 
    153     extension_pane.add(extension_label, BorderLayout.WEST); 
     153    extension_pane.add(extension_label, BorderLayout.LINE_START); 
    154154    extension_pane.add(extension_field, BorderLayout.CENTER); 
    155155 
     
    157157    command_pane.setLayout(new BorderLayout()); 
    158158    command_pane.add(command_field, BorderLayout.CENTER); 
    159     command_pane.add(browse_button, BorderLayout.EAST); 
     159    command_pane.add(browse_button, BorderLayout.LINE_END); 
    160160 
    161161    details_pane.setBorder(BorderFactory.createTitledBorder(Dictionary.get("FileAssociationDialog.Details"))); 
     
    181181    control_pane.setBorder(BorderFactory.createEmptyBorder(5,0,0,0)); 
    182182    control_pane.setLayout(new BorderLayout()); 
    183     control_pane.add(new JScrollPane(existing_associations_table), BorderLayout.CENTER); 
     183        JScrollPane scrol_tmp; 
     184        scrol_tmp = new JScrollPane(existing_associations_table); 
     185        scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     186    control_pane.add(scrol_tmp, BorderLayout.CENTER); 
    184187    control_pane.add(lower_pane, BorderLayout.SOUTH); 
    185188 
    186189    content_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 
    187190    content_pane.setLayout(new BorderLayout()); 
    188     content_pane.add(new JScrollPane(instructions_area), BorderLayout.NORTH); 
     191        scrol_tmp = new JScrollPane(instructions_area); 
     192        scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     193    content_pane.add(scrol_tmp, BorderLayout.NORTH); 
    189194    content_pane.add(control_pane, BorderLayout.CENTER); 
    190195 
     
    192197    setLocation((int)(screen.getX() + (screen.getWidth() - SIZE.width) / 2), (int)(screen.getY() + (screen.getHeight() - SIZE.height) / 2)); 
    193198    screen = null; 
     199         
     200        //RTL 
     201        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
     202        instructions_area.setComponentOrientation(Dictionary.getOrientation()); 
     203        control_pane.setComponentOrientation(Dictionary.getOrientation()); 
     204        existing_associations_table.setComponentOrientation(Dictionary.getOrientation()); 
     205        lower_pane.setComponentOrientation(Dictionary.getOrientation()); 
     206        details_pane.setComponentOrientation(Dictionary.getOrientation()); 
     207        extension_pane.setComponentOrientation(Dictionary.getOrientation()); 
     208        extension_label.setComponentOrientation(Dictionary.getOrientation()); 
     209        extension_field.setComponentOrientation(Dictionary.getOrientation()); 
     210        command_label.setComponentOrientation(Dictionary.getOrientation()); 
     211        command_pane.setComponentOrientation(Dictionary.getOrientation()); 
     212        //end 
    194213    } 
    195214 
  • gli/trunk/src/org/greenstone/gatherer/gui/Filter.java

    r17086 r18370  
    9393    public Filter(DragTree tree, ArrayList others) { 
    9494    super(); 
     95        this.setComponentOrientation(Dictionary.getOrientation()); 
    9596    if (others == null) { 
    9697        others = new ArrayList(); 
     
    118119    } 
    119120    label = new JLabel(Dictionary.get("Filter.Filter_Tree")); 
     121        label.setComponentOrientation(Dictionary.getOrientation()); 
     122        label.setComponentOrientation(org.greenstone.gatherer.Dictionary.getOrientation()); 
    120123    combobox.setToolTipText(Dictionary.get("Collection.Filter_Tooltip")); 
    121124     
     
    127130    setBorder(BorderFactory.createEmptyBorder(2,2,2,2)); 
    128131    setLayout(new BorderLayout()); 
    129     add(label, BorderLayout.WEST); 
     132    add(label, BorderLayout.LINE_START); 
    130133    add(combobox, BorderLayout.CENTER); 
    131134    } 
  • gli/trunk/src/org/greenstone/gatherer/gui/FormatPane.java

    r16680 r18370  
    7373        } 
    7474        JPanel side_panel = new JPanel (); 
     75        side_panel.setComponentOrientation(Dictionary.getOrientation()); 
    7576        side_panel.setLayout (new BorderLayout ()); 
    7677        remove (tree_pane); 
    7778        side_panel.add (tree_pane, BorderLayout.CENTER); 
    7879        JPanel preview_pane = new JPanel (); 
     80        preview_pane.setComponentOrientation(Dictionary.getOrientation()); 
     81         
    7982        preview_pane.setLayout (new BorderLayout ()); 
    8083        preview_pane.setBorder (BorderFactory.createEmptyBorder (5,0,0,0)); 
     
    103106        side_panel.add (preview_pane, BorderLayout.SOUTH); 
    104107         
    105         add (side_panel, BorderLayout.WEST); 
     108        add (side_panel, BorderLayout.LINE_START); 
    106109    } 
    107110     
  • gli/trunk/src/org/greenstone/gatherer/gui/GComboBox.java

    r13195 r18370  
    6262    public GComboBox() { 
    6363    super(); 
     64        this.setComponentOrientation(org.greenstone.gatherer.Dictionary.getOrientation()); 
    6465    init(); 
    6566    setOpaque(!Utility.isMac()); 
     
    6869    public GComboBox(boolean editable) { 
    6970    super(); 
     71        this.setComponentOrientation(org.greenstone.gatherer.Dictionary.getOrientation()); 
    7072    setOpaque(!Utility.isMac()); 
    7173    setEditable(editable); 
     
    7678    public GComboBox(ArrayList data) { 
    7779    super(data.toArray()); 
     80        this.setComponentOrientation(org.greenstone.gatherer.Dictionary.getOrientation()); 
    7881    setOpaque(!Utility.isMac()); 
    7982    init(); 
     
    8285    public GComboBox(ArrayList data, boolean editable) { 
    8386    super(data.toArray()); 
     87        this.setComponentOrientation(org.greenstone.gatherer.Dictionary.getOrientation()); 
    8488    setOpaque(!Utility.isMac()); 
    8589    setEditable(editable); 
     
    8993    public GComboBox(ArrayList data, boolean editable, boolean sorted) { 
    9094    super(data.toArray()); 
     95        this.setComponentOrientation(org.greenstone.gatherer.Dictionary.getOrientation()); 
    9196    setOpaque(!Utility.isMac()); 
    9297    setEditable(editable); 
     
    97102    public GComboBox(ComboBoxModel model) { 
    98103    super(model); 
     104        this.setComponentOrientation(org.greenstone.gatherer.Dictionary.getOrientation()); 
    99105    setOpaque(!Utility.isMac()); 
    100106    init(); 
     
    103109    public GComboBox(ComboBoxModel model, boolean editable) { 
    104110    super(model); 
     111        this.setComponentOrientation(org.greenstone.gatherer.Dictionary.getOrientation()); 
    105112    setOpaque(!Utility.isMac()); 
    106113    setEditable(editable); 
     
    110117    public GComboBox(Object data[]) { 
    111118    super(data); 
     119        this.setComponentOrientation(org.greenstone.gatherer.Dictionary.getOrientation()); 
    112120    setOpaque(!Utility.isMac()); 
    113121    init(); 
     
    116124    public GComboBox(Object data[], boolean editable) { 
    117125    super(data); 
     126        this.setComponentOrientation(org.greenstone.gatherer.Dictionary.getOrientation()); 
    118127    setOpaque(!Utility.isMac()); 
    119128    setEditable(editable); 
     
    123132    public GComboBox(Object data[], boolean editable, boolean sorted) { 
    124133    super(data); 
     134        this.setComponentOrientation(org.greenstone.gatherer.Dictionary.getOrientation()); 
    125135    setOpaque(!Utility.isMac()); 
    126136    setEditable(editable); 
     
    131141    public GComboBox(Vector data) { 
    132142    super(data); 
     143        this.setComponentOrientation(org.greenstone.gatherer.Dictionary.getOrientation()); 
    133144    setOpaque(!Utility.isMac()); 
    134145    init(); 
     
    137148    public GComboBox(Vector data, boolean editable) { 
    138149    super(data); 
     150        this.setComponentOrientation(org.greenstone.gatherer.Dictionary.getOrientation()); 
    139151    setOpaque(!Utility.isMac()); 
    140152    setEditable(editable); 
     
    320332        super(""); 
    321333        this.setOpaque(true); 
     334            this.setComponentOrientation(org.greenstone.gatherer.Dictionary.getOrientation()); 
    322335    } 
    323336    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { 
  • gli/trunk/src/org/greenstone/gatherer/gui/GProgressBar.java

    r11075 r18370  
    2929 
    3030import javax.swing.*; 
     31import org.greenstone.gatherer.Dictionary; 
    3132 
    3233 
     
    4748    { 
    4849    super(0, 100); 
     50        this.setComponentOrientation(Dictionary.getOrientation()); 
    4951    } 
    5052 
  • gli/trunk/src/org/greenstone/gatherer/gui/GUIManager.java

    r18199 r18370  
    117117    public GUIManager(Dimension size) { 
    118118    super(); 
     119        this.setComponentOrientation(Dictionary.getOrientation()); 
    119120    // Initialization 
    120121    this.help = new HelpFrame(); 
     
    329330    public void display() { 
    330331    content_pane = (JPanel) this.getContentPane(); 
     332        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
     333         
    331334    // Enable window-type events to be fired. 
    332335    enableEvents(AWTEvent.WINDOW_EVENT_MASK); 
     
    358361        // Create the menu-bar and stick it up the top. 
    359362        menu_bar = new MenuBar(new MenuListenerImpl()); 
     363            menu_bar.setComponentOrientation(Dictionary.getOrientation()); 
    360364 
    361365        //feedback changes 
     
    367371        // expand to consume all available space like any good gas would. 
    368372        tab_pane = new JTabbedPane(); 
     373            tab_pane.setComponentOrientation(Dictionary.getOrientation()); 
    369374        tab_pane.addChangeListener(this); 
    370375        tab_pane.setFont(Configuration.getFont("general.font", false)); 
     
    377382        } 
    378383 
    379         gather_pane = new GatherPane(); 
     384        gather_pane = new GatherPane();           
    380385        gather_pane.display(); 
    381386        if (Configuration.get("workflow.gather", true)) { 
     
    408413 
    409414        create_pane = new CreatePane(); 
     415            create_pane.setComponentOrientation(Dictionary.getOrientation()); 
    410416        create_pane.display(); 
    411417        if (Configuration.get("workflow.create", true)) { 
     
    416422 
    417423        format_pane = new FormatPane(); 
     424            format_pane.setComponentOrientation(Dictionary.getOrientation()); 
    418425        format_pane.display(); 
    419426        if (Configuration.get("workflow.format", true)) { 
     
    424431        // The MetaAuditFrame must be created after the gather/enrich panes but before they get focus 
    425432        meta_audit = new MetaAuditFrame(); 
    426  
     433            meta_audit.setComponentOrientation(Dictionary.getOrientation()); 
    427434        // Select the collect pane if it is available 
    428435        if (tab_pane.indexOfComponent(gather_pane) != -1) { 
     
    444451        if (Gatherer.isGsdlRemote) { 
    445452        JPanel remote_greenstone_server_progress_panel = new JPanel(); 
     453               //remote_greenstone_server_progress_panel.setComponentOrientation(Dictionary.getOrientation()); 
    446454        JLabel remote_greenstone_server_progress_label = new JLabel(Dictionary.get("RemoteGreenstoneServer.Progress")); 
     455                //remote_greenstone_server_progress_label.setComponentOrientation(Dictionary.getOrientation()); 
    447456        remote_greenstone_server_progress_panel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 
    448457        remote_greenstone_server_progress_panel.setLayout(new BorderLayout()); 
    449         remote_greenstone_server_progress_panel.add(remote_greenstone_server_progress_label, BorderLayout.WEST); 
     458        remote_greenstone_server_progress_panel.add(remote_greenstone_server_progress_label, BorderLayout.LINE_START); 
    450459        remote_greenstone_server_progress_panel.add(Gatherer.remoteGreenstoneServer.getProgressBar(), BorderLayout.CENTER); 
    451460        content_pane.add(remote_greenstone_server_progress_panel, BorderLayout.SOUTH); 
     
    715724    { 
    716725    OpenCollectionDialog dialog = new OpenCollectionDialog(); 
     726        dialog.setComponentOrientation(Dictionary.getOrientation()); 
    717727    if (dialog.display() == OpenCollectionDialog.OK_OPTION) { 
    718728        return dialog.getFileName(); 
  • gli/trunk/src/org/greenstone/gatherer/gui/GatherPane.java

    r13520 r18370  
    127127    this.group = new DragGroup(); 
    128128    this.file_queue = Gatherer.f_man.getQueue(); 
    129  
     129        this.setComponentOrientation(org.greenstone.gatherer.Dictionary.getOrientation()); 
    130130    // Create components. 
    131131    stop_action = new GLIButton(Dictionary.get("Collection.Stop"), Dictionary.get("Collection.Stop_Tooltip")); 
     
    207207    workspace_pane.setPreferredSize(TREE_SIZE); 
    208208    workspace_pane.setSize(TREE_SIZE); 
     209        workspace_pane.setComponentOrientation(Dictionary.getOrientation()); 
    209210 
    210211    workspace_label = new JLabel(Dictionary.get("Collection.Workspace")); 
     
    212213    workspace_label.setBackground(Configuration.getColor("coloring.workspace_heading_background", false)); 
    213214    workspace_label.setForeground(Configuration.getColor("coloring.workspace_heading_foreground", false)); 
    214      
     215    workspace_label.setComponentOrientation(Dictionary.getOrientation()); 
     216         
    215217    workspace_tree = new WorkspaceTree(); 
     218        workspace_tree.setComponentOrientation(Dictionary.getOrientation()); 
    216219    group.add(workspace_tree); 
    217220    workspace_scroll = new JScrollPane(workspace_tree); 
     221        workspace_scroll.setComponentOrientation(Dictionary.getOrientation()); 
    218222    workspace_filter = workspace_tree.getFilter(); 
    219  
     223        workspace_filter.setComponentOrientation(Dictionary.getOrientation());  
     224         
    220225    card_layout = new CardLayout(); 
    221226 
     
    225230    collection_pane.setPreferredSize(TREE_SIZE); 
    226231    collection_pane.setSize(TREE_SIZE); 
    227  
     232        collection_pane.setComponentOrientation(Dictionary.getOrientation()); 
     233         
    228234    collection_label = new JLabel(Dictionary.get("Collection.Collection")); 
    229235    collection_label.setOpaque(true); 
    230      
     236    collection_label.setComponentOrientation(Dictionary.getOrientation()); 
     237         
    231238    collection_tree = Gatherer.c_man.getCollectionTree(); 
    232239    collection_tree.setEnabled(Gatherer.c_man.getCollectionTreeModel() != null); 
     
    235242 
    236243    tree_pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); 
    237  
     244        tree_pane.setComponentOrientation(Dictionary.getOrientation()); 
    238245    // No collection loaded pane 
    239246    JPanel no_collection_pane = new JPanel(); 
    240247    no_collection_pane.setBackground(Color.lightGray); 
    241  
     248        no_collection_pane.setComponentOrientation(Dictionary.getOrientation()); 
     249         
    242250    JLabel no_collection_label = new JLabel(Dictionary.get("Collection.Collection")); 
    243251    no_collection_label.setBackground(Color.lightGray); 
    244252    no_collection_label.setForeground(Color.black); 
    245253    no_collection_label.setOpaque(true); 
     254        no_collection_label.setComponentOrientation(Dictionary.getOrientation()); 
    246255     
    247256    JPanel no_collection_loaded_panel = new JPanel(); 
    248257    no_collection_loaded_panel.setBorder(BorderFactory.createLineBorder(Color.black)); 
    249258    no_collection_loaded_panel.setBackground(Color.lightGray); 
    250  
     259        no_collection_loaded_panel.setComponentOrientation(Dictionary.getOrientation()); 
     260         
    251261    JLabel no_collection_loaded_label = new JLabel(Dictionary.get("Collection.No_Collection_Loaded")); 
    252262    no_collection_loaded_label.setHorizontalAlignment(JLabel.CENTER); 
    253263    no_collection_loaded_label.setVerticalAlignment(JLabel.CENTER); 
    254      
     264    no_collection_loaded_label.setComponentOrientation(Dictionary.getOrientation()); 
     265         
    255266    // Status pane 
    256267    control_pane = new JPanel(); 
    257  
     268        control_pane.setComponentOrientation(Dictionary.getOrientation()); 
     269         
    258270    JPanel inner_pane = new JPanel(); 
    259271    inner_pane.setSize(STATUS_SIZE); 
    260  
     272        inner_pane.setComponentOrientation(Dictionary.getOrientation()); 
     273         
    261274    card_pane = new JPanel(); 
     275        card_pane.setComponentOrientation(Dictionary.getOrientation()); 
     276         
    262277    JPanel file_pane = new JPanel(); 
     278        file_pane.setComponentOrientation(Dictionary.getOrientation()); 
     279         
    263280    JPanel progress_pane = new JPanel(); 
     281        progress_pane.setComponentOrientation(Dictionary.getOrientation()); 
     282         
    264283    JLabel file_status = file_queue.getFileStatus(); 
    265  
     284        file_status.setComponentOrientation(Dictionary.getOrientation()); 
     285         
    266286    JProgressBar progress_bar = file_queue.getProgressBar(); 
    267  
     287        progress_bar.setComponentOrientation(Dictionary.getOrientation()); 
     288         
    268289    JPanel button_pane = new JPanel(); 
    269  
     290        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    270291    RecycleBin recycle_bin = Gatherer.recycle_bin; 
    271292    recycle_bin.addActionListener(this); 
     
    295316    card_pane.add(collection_pane, COLLECTION_LOADED_CARD); 
    296317 
    297     tree_pane.add(workspace_pane, JSplitPane.LEFT); 
    298     tree_pane.add(card_pane, JSplitPane.RIGHT); 
     318        if (Dictionary.getOrientation().isLeftToRight()){ 
     319            tree_pane.add(workspace_pane, JSplitPane.LEFT); 
     320            tree_pane.add(card_pane, JSplitPane.RIGHT); 
     321        }else{ 
     322            tree_pane.add(workspace_pane, JSplitPane.RIGHT); 
     323            tree_pane.add(card_pane, JSplitPane.LEFT); 
     324        } 
     325         
     326         
    299327    tree_pane.setDividerLocation(TREE_SIZE.width - 10); 
    300328 
     
    302330    file_pane.setLayout(new BorderLayout()); 
    303331    file_pane.add(file_status, BorderLayout.CENTER); 
    304     file_pane.add(stop_action, BorderLayout.EAST); 
     332    file_pane.add(stop_action, BorderLayout.LINE_END); 
    305333 
    306334    progress_pane.setBorder(BorderFactory.createEmptyBorder(2,2,2,2)); 
     
    318346    control_pane.setLayout(new BorderLayout()); 
    319347    control_pane.add(inner_pane, BorderLayout.CENTER); 
    320     control_pane.add(button_pane, BorderLayout.EAST); 
     348    control_pane.add(button_pane, BorderLayout.LINE_END); 
    321349 
    322350    this.setLayout(new BorderLayout()); 
  • gli/trunk/src/org/greenstone/gatherer/gui/HelpFrame.java

    r17916 r18370  
    8181    setSize(SIZE); 
    8282    setTitle(Dictionary.get("Help.Title")); 
    83  
     83        this.setComponentOrientation(Dictionary.getOrientation()); 
     84         
    8485    help_pane = new JEditorPane(); 
     86        help_pane.setComponentOrientation(Dictionary.getOrientation()); 
    8587    help_pane.setEditable(false); 
    8688    help_pane.addHyperlinkListener(new HelpPaneHyperlinkListener()); 
     
    8991    help_contents_tree_model = new HelpContentsTreeModel(help_tree_root_node); 
    9092    help_contents_tree = new JTree((DefaultTreeModel) help_contents_tree_model); 
     93        help_contents_tree.setComponentOrientation(Dictionary.getOrientation()); 
    9194    help_contents_tree.addTreeSelectionListener(new HelpContentsTreeSelectionListener()); 
    9295    help_contents_tree.setExpandsSelectedPaths(true); 
     
    9497    // Creation 
    9598    JPanel content_pane = (JPanel) this.getContentPane(); 
    96     split_pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); 
     99    content_pane.setComponentOrientation(Dictionary.getOrientation()); 
     100        split_pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); 
    97101    JScrollPane help_contents_tree_scroll = new JScrollPane(help_contents_tree); 
     102        help_contents_tree_scroll.setComponentOrientation(Dictionary.getOrientation()); 
    98103    JScrollPane help_pane_scroll = new JScrollPane(help_pane); 
     104        help_pane_scroll.setComponentOrientation(Dictionary.getOrientation()); 
    99105 
    100106    // Layout 
    101     split_pane.add(help_contents_tree_scroll, JSplitPane.LEFT); 
    102     split_pane.add(help_pane_scroll, JSplitPane.RIGHT); 
     107        if (Dictionary.getOrientation().isLeftToRight()){ 
     108            split_pane.add(help_contents_tree_scroll, JSplitPane.LEFT); 
     109            split_pane.add(help_pane_scroll, JSplitPane.RIGHT); 
     110        }else{ 
     111            split_pane.add(help_contents_tree_scroll, JSplitPane.RIGHT); 
     112            split_pane.add(help_pane_scroll, JSplitPane.LEFT); 
     113        } 
     114         
    103115    content_pane.setLayout(new BorderLayout()); 
    104116    content_pane.add(split_pane, BorderLayout.CENTER); 
  • gli/trunk/src/org/greenstone/gatherer/gui/LockFileDialog.java

    r12119 r18370  
    6666    public LockFileDialog(JFrame parent, String name, File lock_file) { 
    6767    super(parent, Dictionary.get("LockFileDialog.Title"), true); 
     68        this.setComponentOrientation(Dictionary.getOrientation()); 
    6869    setSize(SIZE); 
    6970    setJMenuBar(new SimpleMenuBar("openingacollection")); 
     
    7576    // Creation 
    7677    JPanel content_pane = (JPanel) getContentPane(); 
     78        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
    7779    JPanel upper_pane = new JPanel(); 
     80        upper_pane.setComponentOrientation(Dictionary.getOrientation()); 
    7881    ImageIcon icon = JarTools.getImage("lcolicn.gif"); 
    7982    ImageIcon scaled_icon = new ImageIcon(icon.getImage().getScaledInstance(ICON_SIZE, ICON_SIZE, Image.SCALE_DEFAULT)); 
    8083    JLabel icon_label = new JLabel(scaled_icon); 
     84        icon_label.setComponentOrientation(Dictionary.getOrientation()); 
    8185    JPanel title_pane = new JPanel(); 
     86        title_pane.setComponentOrientation(Dictionary.getOrientation()); 
    8287    JLabel title_one_label = new JLabel(Dictionary.get("General.Warning")); 
    83      
     88    title_one_label.setComponentOrientation(Dictionary.getOrientation()); 
    8489    JTextArea title_two_textarea = new JTextArea(Dictionary.get("LockFileDialog.Lockfile_Message_One")); 
     90        title_two_textarea.setComponentOrientation(Dictionary.getOrientation()); 
    8591    title_two_textarea.setEditable(false); 
    8692    title_two_textarea.setLineWrap(true); 
     
    8995    title_two_textarea.setWrapStyleWord(true); 
    9096     
    91     JPanel central_pane = new JPanel(); 
    92  
     97        JPanel central_pane = new JPanel(); 
     98        central_pane.setComponentOrientation(Dictionary.getOrientation()); 
     99         
    93100    JPanel name_pane = new JPanel(); 
     101        name_pane.setComponentOrientation(Dictionary.getOrientation()); 
    94102    JLabel name_label = new JLabel(Dictionary.get("LockFileDialog.Name")); 
     103        name_label.setComponentOrientation(Dictionary.getOrientation()); 
    95104    name_label.setPreferredSize(LABEL_SIZE); 
    96105     
    97106    JTextField name_field = new JTextField(name); 
     107        name_field.setComponentOrientation(Dictionary.getOrientation()); 
    98108    name_field.setEditable(false); 
    99109    name_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 
    100110 
    101     JPanel person_pane = new JPanel(); 
    102     JLabel person_label = new JLabel(Dictionary.get("LockFileDialog.User")); 
     111 
     112        JPanel person_pane = new JPanel(); 
     113    person_pane.setComponentOrientation(Dictionary.getOrientation()); 
     114        JLabel person_label = new JLabel(Dictionary.get("LockFileDialog.User")); 
     115        person_label.setComponentOrientation(Dictionary.getOrientation()); 
    103116    person_label.setPreferredSize(LABEL_SIZE); 
    104117     
    105118    JTextField person_field = new JTextField(getValue("User")); 
     119        person_field.setComponentOrientation(Dictionary.getOrientation()); 
    106120    person_field.setEditable(false); 
    107121    person_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 
    108122 
    109123    JPanel machine_pane = new JPanel(); 
     124        machine_pane.setComponentOrientation(Dictionary.getOrientation()); 
    110125    JLabel machine_label = new JLabel(Dictionary.get("LockFileDialog.Machine")); 
     126        machine_label.setComponentOrientation(Dictionary.getOrientation()); 
    111127    machine_label.setPreferredSize(LABEL_SIZE); 
    112128     
    113129    JTextField machine_field = new JTextField(getValue("Machine")); 
     130        machine_field.setComponentOrientation(Dictionary.getOrientation()); 
    114131    machine_field.setEditable(false); 
    115132    machine_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 
    116133 
    117134    JPanel created_pane = new JPanel(); 
     135        created_pane.setComponentOrientation(Dictionary.getOrientation()); 
    118136    JLabel created_label = new JLabel(Dictionary.get("LockFileDialog.Date")); 
    119137    created_label.setPreferredSize(LABEL_SIZE); 
     138        created_label.setComponentOrientation(Dictionary.getOrientation()); 
    120139     
    121140    JTextField created_field = new JTextField(getValue("Date")); 
     141        created_field.setComponentOrientation(Dictionary.getOrientation()); 
    122142    created_field.setEditable(false); 
    123143    created_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 
    124144 
    125145    JLabel central_label = new JLabel(Dictionary.get("LockFileDialog.Lockfile_Message_Two")); 
    126      
     146    central_label.setComponentOrientation(Dictionary.getOrientation()); 
     147         
    127148    JPanel button_pane = new JPanel(); 
     149        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    128150    ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("LockFileDialog.OK_Tooltip")); 
    129151     
     
    142164 
    143165    upper_pane.setLayout(new BorderLayout()); 
    144     upper_pane.add(icon_label, BorderLayout.WEST); 
     166    upper_pane.add(icon_label, BorderLayout.LINE_START); 
    145167    upper_pane.add(title_pane, BorderLayout.CENTER); 
    146168 
    147169    name_pane.setLayout(new BorderLayout()); 
    148     name_pane.add(name_label, BorderLayout.WEST); 
     170    name_pane.add(name_label, BorderLayout.LINE_START); 
    149171    name_pane.add(name_field, BorderLayout.CENTER); 
    150172 
    151173    person_pane.setLayout(new BorderLayout()); 
    152     person_pane.add(person_label, BorderLayout.WEST); 
     174    person_pane.add(person_label, BorderLayout.LINE_START); 
    153175    person_pane.add(person_field, BorderLayout.CENTER); 
    154176 
    155177    machine_pane.setLayout(new BorderLayout()); 
    156     machine_pane.add(machine_label, BorderLayout.WEST); 
     178    machine_pane.add(machine_label, BorderLayout.LINE_START); 
    157179    machine_pane.add(machine_field, BorderLayout.CENTER); 
    158180 
    159181    created_pane.setLayout(new BorderLayout()); 
    160     created_pane.add(created_label, BorderLayout.WEST); 
     182    created_pane.add(created_label, BorderLayout.LINE_START); 
    161183    created_pane.add(created_field, BorderLayout.CENTER); 
    162184 
  • 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); 
  • gli/trunk/src/org/greenstone/gatherer/gui/MetadataImportMappingPrompt.java

    r12119 r18370  
    3939    // Construction and configuration 
    4040    JDialog dialog = new ModalDialog(Gatherer.g_man); 
     41        dialog.setComponentOrientation(Dictionary.getOrientation()); 
    4142    dialog.setModal(true); 
    4243    dialog.setSize(DIALOG_SIZE); 
     
    7273    // Layout 
    7374    JPanel left_pane = new JPanel(); 
     75        left_pane.setComponentOrientation(Dictionary.getOrientation()); 
    7476    left_pane.setLayout(new GridLayout(3,1)); 
    75     left_pane.add(new JLabel(Dictionary.get("MIMP.Source_Element"))); 
    76     left_pane.add(new JLabel(Dictionary.get("MIMP.Target_Set"))); 
    77     left_pane.add(new JLabel(Dictionary.get("MIMP.Target_Element"))); 
     77         
     78        JLabel tmp_lable; 
     79         
     80        tmp_lable = new JLabel(Dictionary.get("MIMP.Source_Element")); 
     81        tmp_lable.setComponentOrientation(Dictionary.getOrientation()); 
     82    left_pane.add(tmp_lable); 
     83         
     84        tmp_lable = new JLabel(Dictionary.get("MIMP.Target_Set")); 
     85        tmp_lable.setComponentOrientation(Dictionary.getOrientation()); 
     86    left_pane.add(tmp_lable); 
     87         
     88        tmp_lable = new JLabel(Dictionary.get("MIMP.Target_Element")); 
     89        tmp_lable.setComponentOrientation(Dictionary.getOrientation()); 
     90    left_pane.add(tmp_lable); 
    7891 
    7992    JPanel right_pane = new JPanel(); 
     93        right_pane.setComponentOrientation(Dictionary.getOrientation()); 
     94         
    8095    right_pane.setLayout(new GridLayout(3,1)); 
    81     right_pane.add(new JLabel(metadata_element_name_full)); 
     96    tmp_lable = new JLabel(metadata_element_name_full); 
     97        tmp_lable.setComponentOrientation(Dictionary.getOrientation()); 
     98        right_pane.add(tmp_lable); 
    8299    right_pane.add(metadata_sets_combobox); 
    83100    right_pane.add(metadata_elements_combobox); 
    84101 
    85102    JPanel button_pane = new JPanel(); 
     103        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    86104    button_pane.setBorder(BorderFactory.createEmptyBorder(0,5,5,5)); 
    87105    button_pane.setLayout(new GridLayout(1,3)); 
     
    91109 
    92110    JPanel content_pane = (JPanel) dialog.getContentPane(); 
     111        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
    93112    content_pane.setLayout(new BorderLayout()); 
    94113    content_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 
    95     content_pane.add(left_pane, BorderLayout.WEST); 
     114    content_pane.add(left_pane, BorderLayout.LINE_START); 
    96115    content_pane.add(right_pane, BorderLayout.CENTER); 
    97116    content_pane.add(button_pane, BorderLayout.SOUTH); 
  • gli/trunk/src/org/greenstone/gatherer/gui/MetadataSetDialog.java

    r13681 r18370  
    4343    super(Gatherer.g_man, true); 
    4444    set_dialog = this; 
    45      
     45    this.setComponentOrientation(Dictionary.getOrientation()); 
    4646    setJMenuBar(new SimpleMenuBar("selectingmetadatasets")); 
    4747    setSize(SIZE); 
     
    5656    } 
    5757    JPanel content_pane = (JPanel) getContentPane(); 
     58        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
    5859        content_pane.setOpaque(true); 
    5960     
    6061    JLabel current_metadata_sets_label = new JLabel(Dictionary.get("MetadataSetDialog.Current_Sets")); 
    61     current_metadata_sets_label.setOpaque(true); 
     62    current_metadata_sets_label.setComponentOrientation(Dictionary.getOrientation()); 
     63        current_metadata_sets_label.setOpaque(true); 
    6264    current_set_list = new JList(current_metadata_model); 
     65        current_set_list.setComponentOrientation(Dictionary.getOrientation()); 
    6366    current_set_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); 
    6467 
    6568    JPanel button_pane = new JPanel(); 
     69        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    6670    add_button = new GLIButton(Dictionary.get("MetadataSetDialog.Add"), Dictionary.get("MetadataSetDialog.Add_Tooltip")); 
    6771    add_button.setEnabled(true); 
     
    98102    content_pane.setLayout(new BorderLayout()); 
    99103    content_pane.add(current_metadata_sets_label, BorderLayout.NORTH); 
    100     content_pane.add(new JScrollPane(current_set_list), BorderLayout.CENTER); 
     104        JScrollPane scrol_tmp; 
     105        scrol_tmp = new JScrollPane(current_set_list); 
     106        scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     107    content_pane.add(scrol_tmp, BorderLayout.CENTER); 
    101108    content_pane.add(button_pane, BorderLayout.SOUTH); 
    102109     
     
    202209    public AddMetadataSetPrompt() { 
    203210        super(Gatherer.g_man, true); 
     211            this.setComponentOrientation(Dictionary.getOrientation()); 
    204212        add_set_dialog = this; 
    205213        setModal(true); 
     
    211219 
    212220        JPanel center_pane = new JPanel(); 
     221            center_pane.setComponentOrientation(Dictionary.getOrientation()); 
    213222        JPanel sets_pane = new JPanel(); 
     223            sets_pane.setComponentOrientation(Dictionary.getOrientation()); 
    214224        JLabel sets_label = new JLabel(Dictionary.get("MetadataSetDialog.Available_Sets")); 
     225            sets_label.setComponentOrientation(Dictionary.getOrientation()); 
    215226        sets_label.setOpaque(false); 
    216227         
    217228        available_sets_list = new JList(getValidSetModel()); 
     229            available_sets_list.setComponentOrientation(Dictionary.getOrientation()); 
    218230        available_sets_list.addListSelectionListener(new AvailableSetListSelectionListener()); 
    219231        available_sets_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); 
     232             
    220233        JPanel elements_pane = new JPanel(); 
     234            elements_pane.setComponentOrientation(Dictionary.getOrientation()); 
    221235        JLabel elements_label = new JLabel(Dictionary.get("MetadataSetDialog.Elements")); 
    222          
     236        elements_label.setComponentOrientation(Dictionary.getOrientation()); 
     237             
    223238        elements_list = new JList(); 
     239            elements_list.setComponentOrientation(Dictionary.getOrientation()); 
    224240        elements_list.setCellRenderer(new MetadataElementListCellRenderer()); 
    225241        elements_list.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 
     
    229245         
    230246        JPanel button_pane = new JPanel(); 
     247            button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    231248        add_button = new GLIButton(Dictionary.get("MetadataSetDialog.Add_Set"), Dictionary.get("MetadataSetDialog.Add_Set_Tooltip")); 
    232249        add_button.setEnabled(false); 
     
    283300         
    284301        JPanel content_pane = (JPanel) getContentPane(); 
     302            content_pane.setComponentOrientation(Dictionary.getOrientation()); 
    285303        content_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 
    286304        content_pane.setLayout(new BorderLayout()); 
     
    292310        setLocation((screen_size.width - ADD_SIZE.width) / 2, (screen_size.height - ADD_SIZE.height) / 2); 
    293311        setVisible(true); 
    294          
    295  
    296          
     312                
    297313    } 
    298314     
     
    368384        public void actionPerformed(ActionEvent event) { 
    369385        JFileChooser chooser = new JFileChooser(new File(Gatherer.getGLIMetadataDirectoryPath())); 
     386                chooser.setComponentOrientation(Dictionary.getOrientation()); 
    370387        chooser.setFileFilter(new MetadataSet.MetadataSetFileFilter()); 
    371388        chooser.setDialogTitle(Dictionary.get("MetadataSetDialog.Add_Title")); 
  • gli/trunk/src/org/greenstone/gatherer/gui/MetadataValueTablePane.java

    r12345 r18370  
    6565    { 
    6666    super(); 
    67  
     67        this.setComponentOrientation(Dictionary.getOrientation()); 
    6868    metadata_value_table = new MetadataValueTable(); 
    6969 
     
    7171    metadata_value_table_scroll.getViewport().setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 
    7272    metadata_value_table_scroll.setOpaque(true); 
    73  
     73        metadata_value_table_scroll.setComponentOrientation(Dictionary.getOrientation()); 
     74         
    7475    JPanel metadata_value_table_pane = new JPanel(); 
    7576    metadata_value_table_pane.setLayout(new BorderLayout()); 
    7677    metadata_value_table_pane.add(metadata_value_table_scroll, BorderLayout.CENTER); 
    77  
     78        metadata_value_table_pane.setComponentOrientation(Dictionary.getOrientation()); 
     79         
    7880    JLabel no_metadata_available_label = new JLabel(Dictionary.get("EnrichPane.No_Metadata")); 
    7981    no_metadata_available_label.setHorizontalAlignment(JLabel.CENTER); 
    8082    no_metadata_available_label.setOpaque(false); 
    8183    no_metadata_available_label.setVerticalAlignment(JLabel.CENTER); 
    82      
     84    no_metadata_available_label.setComponentOrientation(Dictionary.getOrientation()); 
     85         
    8386    JPanel no_metadata_available_pane = new JPanel(); 
    8487    no_metadata_available_pane.setLayout(new BorderLayout()); 
    8588    no_metadata_available_pane.add(no_metadata_available_label, BorderLayout.CENTER); 
    86  
     89        no_metadata_available_pane.setComponentOrientation(Dictionary.getOrientation()); 
     90         
    8791    JLabel no_files_selected_label = new JLabel(Dictionary.get("EnrichPane.No_File")); 
    8892    no_files_selected_label.setHorizontalAlignment(JLabel.CENTER); 
    8993    no_files_selected_label.setOpaque(false); 
    9094    no_files_selected_label.setVerticalAlignment(JLabel.CENTER); 
    91      
     95    no_files_selected_label.setComponentOrientation(Dictionary.getOrientation()); 
     96         
    9297    JPanel no_files_selected_pane = new JPanel(); 
    9398    no_files_selected_pane.setLayout(new BorderLayout()); 
    9499    no_files_selected_pane.add(no_files_selected_label, BorderLayout.CENTER); 
    95  
     100        no_files_selected_pane.setComponentOrientation(Dictionary.getOrientation()); 
     101         
    96102    card_layout = new CardLayout(); 
    97103 
     
    186192    public MetadataValueTable() 
    187193    { 
     194            this.setComponentOrientation(Dictionary.getOrientation()); 
    188195        // Create the model for the table 
    189196        metadata_value_table_model = new MetadataValueTableModel(); 
     
    199206        metadata_value_text_field.addMouseListener(new MetadataValueTextFieldMouseListener()); 
    200207        metadata_value_text_field.setBorder(null); 
     208            metadata_value_text_field.setComponentOrientation(Dictionary.getOrientation()); 
    201209 
    202210        // We need to listen for key presses so we can catch Enter presses 
     
    208216        // We also have to ensure that the table column header hasn't gone on a severe Jenny Craig binge and has somehow lost 7/8th of its component size 
    209217        JTableHeader table_header = getTableHeader(); 
     218            table_header.setComponentOrientation(Dictionary.getOrientation()); 
     219             
    210220        Dimension table_header_preferred_size = table_header.getPreferredSize(); 
    211221        if (table_header_preferred_size.height < MINIMUM_TABLE_HEADER_SIZE) { 
     
    319329        { 
    320330        JComponent component = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); 
    321  
     331                component.setComponentOrientation(Dictionary.getOrientation()); 
     332                 
    322333        int real_column = table.convertColumnIndexToModel(column); 
    323334        // First column: inherited metadata icon 
  • gli/trunk/src/org/greenstone/gatherer/gui/MetadataValueTreePane.java

    r12119 r18370  
    9898    { 
    9999    super(); 
    100  
     100        JScrollPane scrol_tmp; 
     101        this.setComponentOrientation(Dictionary.getOrientation()); 
     102        metadata_value_tree_label.setComponentOrientation(Dictionary.getOrientation()); 
    101103    // Card containing the metadata value tree 
    102104    metadata_value_tree = new JTree(); 
     105        metadata_value_tree.setComponentOrientation(Dictionary.getOrientation()); 
    103106    metadata_value_tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); 
    104107    metadata_value_tree.setModel(null); 
     
    107110 
    108111    JPanel metadata_value_tree_pane = new JPanel(); 
     112        metadata_value_tree_pane.setComponentOrientation(Dictionary.getOrientation());         
    109113    metadata_value_tree_pane.setLayout(new BorderLayout()); 
    110114    metadata_value_tree_pane.add(metadata_value_tree_label, BorderLayout.NORTH); 
    111     metadata_value_tree_pane.add(new JScrollPane(metadata_value_tree), BorderLayout.CENTER); 
     115        scrol_tmp = new JScrollPane(metadata_value_tree); 
     116        scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     117    metadata_value_tree_pane.add(scrol_tmp, BorderLayout.CENTER); 
    112118 
    113119    // Card containing the "extracted metadata element selected" message 
    114120    extracted_metadata_element_selected_message = new JTextArea(""); 
     121        extracted_metadata_element_selected_message.setComponentOrientation(Dictionary.getOrientation()); 
    115122    extracted_metadata_element_selected_message.setEditable(false); 
    116123    extracted_metadata_element_selected_message.setLineWrap(true); 
     
    119126 
    120127    JPanel extracted_metadata_element_selected_pane = new JPanel(); 
     128        extracted_metadata_element_selected_pane.setComponentOrientation(Dictionary.getOrientation()); 
    121129    extracted_metadata_element_selected_pane.setBorder(BorderFactory.createEmptyBorder(25,0,0,0)); 
    122130    extracted_metadata_element_selected_pane.setLayout(new BorderLayout()); 
     
    129137    inherited_metadata_selected_message.setOpaque(false); 
    130138    inherited_metadata_selected_message.setWrapStyleWord(true); 
     139        inherited_metadata_selected_message.setComponentOrientation(Dictionary.getOrientation()); 
    131140     
    132141    JPanel inherited_metadata_selected_pane = new JPanel(); 
     
    134143    inherited_metadata_selected_pane.setLayout(new BorderLayout()); 
    135144    inherited_metadata_selected_pane.add(inherited_metadata_selected_message, BorderLayout.CENTER); 
    136  
     145        inherited_metadata_selected_pane.setComponentOrientation(Dictionary.getOrientation()); 
    137146    // Card containing the "not one file only metadata selected" message 
    138147    JTextArea not_one_file_only_metadata_selected_message = new JTextArea(Dictionary.get("EnrichPane.NotOneFileOnlyMetadataSelected")); 
     
    141150    not_one_file_only_metadata_selected_message.setOpaque(false); 
    142151    not_one_file_only_metadata_selected_message.setWrapStyleWord(true); 
    143      
     152        not_one_file_only_metadata_selected_message.setComponentOrientation(Dictionary.getOrientation()); 
     153         
    144154    JPanel not_one_file_only_metadata_selected_pane = new JPanel(); 
    145155    not_one_file_only_metadata_selected_pane.setBorder(BorderFactory.createEmptyBorder(25,0,0,0)); 
    146156    not_one_file_only_metadata_selected_pane.setLayout(new BorderLayout()); 
    147157    not_one_file_only_metadata_selected_pane.add(not_one_file_only_metadata_selected_message, BorderLayout.CENTER); 
    148  
     158        not_one_file_only_metadata_selected_pane.setComponentOrientation(Dictionary.getOrientation()); 
     159         
    149160    // Card containing the "no metadata element selected" message 
    150161    JLabel no_metadata_element_selected_label = new JLabel(Dictionary.get("EnrichPane.No_Metadata_Element")); 
     
    152163    no_metadata_element_selected_label.setOpaque(false); 
    153164    no_metadata_element_selected_label.setVerticalAlignment(JLabel.CENTER); 
    154      
     165        no_metadata_element_selected_label.setComponentOrientation(Dictionary.getOrientation()); 
     166         
    155167    JPanel no_metadata_element_selected_pane = new JPanel(); 
    156168    no_metadata_element_selected_pane.setLayout(new BorderLayout()); 
    157169    no_metadata_element_selected_pane.add(no_metadata_element_selected_label, BorderLayout.CENTER); 
    158  
     170        no_metadata_element_selected_pane.setComponentOrientation(Dictionary.getOrientation()); 
     171         
    159172    card_layout = new CardLayout(); 
    160  
     173         
    161174    this.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 
    162175    this.setFont(Configuration.getFont("general.font", false)); 
  • gli/trunk/src/org/greenstone/gatherer/gui/ModalProgressPopup.java

    r9340 r18370  
    3131import javax.swing.*; 
    3232import org.greenstone.gatherer.Configuration; 
     33import org.greenstone.gatherer.Dictionary; 
    3334import org.greenstone.gatherer.Gatherer; 
    3435 
     
    4748    super(Gatherer.g_man, title); 
    4849    this.message = message; 
     50        this.setComponentOrientation(Dictionary.getOrientation()); 
    4951    } 
    5052 
     
    6668    // Create 
    6769    JProgressBar progress_bar = new JProgressBar(); 
     70        progress_bar.setComponentOrientation(Dictionary.getOrientation()); 
    6871    progress_bar.setIndeterminate(true); 
    6972 
    7073    // Layout 
    7174    JPanel content_pane = (JPanel) getContentPane(); 
     75        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
    7276    content_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 
    7377    content_pane.setLayout(new BorderLayout()); 
    74     content_pane.add(new JLabel(message), BorderLayout.NORTH); 
     78         
     79        JLabel tmp = new JLabel(message); 
     80        tmp.setComponentOrientation(Dictionary.getOrientation()); 
     81     
     82        content_pane.add(tmp, BorderLayout.NORTH); 
    7583    content_pane.add(progress_bar, BorderLayout.CENTER); 
    7684 
  • gli/trunk/src/org/greenstone/gatherer/gui/NewCollectionDetailsPrompt.java

    r18130 r18370  
    9090     */ 
    9191    public NewCollectionDetailsPrompt() { 
    92     super(Gatherer.g_man, true); 
     92    super(Gatherer.g_man, true);         
    9393    this.cancelled = true; 
     94        this.setComponentOrientation(Dictionary.getOrientation()); 
    9495    this.self = this; 
    9596    // Setup 
     
    121122    // Creation 
    122123    JPanel content_pane = (JPanel) getContentPane(); 
     124        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
    123125    content_pane.setOpaque(true); 
    124126    JPanel upper_pane = new JPanel(); 
     127        upper_pane.setComponentOrientation(Dictionary.getOrientation()); 
    125128    JLabel instructions_label = new JLabel(Dictionary.get("NewCollectionPrompt.Instructions")); 
    126      
     129    instructions_label.setComponentOrientation(Dictionary.getOrientation()); 
     130         
    127131    JPanel title_pane = new JPanel(); 
     132        title_pane.setComponentOrientation(Dictionary.getOrientation()); 
    128133    JLabel title_label = new JLabel(Dictionary.get("CDM.General.Collection_Name")); 
     134        title_label.setComponentOrientation(Dictionary.getOrientation()); 
    129135    title = new JTextField(); 
     136        title.setComponentOrientation(Dictionary.getOrientation()); 
    130137    title.setPreferredSize(COMPONENT_SIZE); 
    131138    title.setToolTipText(Dictionary.get("CDM.General.Collection_Name_Tooltip")); 
    132139    JLabel name_label = new JLabel(Dictionary.get("NewCollectionPrompt.Collection_Name")); 
    133      
     140    name_label.setComponentOrientation(Dictionary.getOrientation()); 
     141         
    134142    JPanel center_pane = new JPanel(); 
     143        center_pane.setComponentOrientation(Dictionary.getOrientation()); 
    135144    JPanel description_pane = new JPanel(); 
     145        description_pane.setComponentOrientation(Dictionary.getOrientation()); 
    136146    JLabel description_label = new JLabel(Dictionary.get("NewCollectionPrompt.Collection_Description")); 
     147        description_label.setComponentOrientation(Dictionary.getOrientation()); 
    137148    description = new JTextArea(); 
     149        description.setComponentOrientation(Dictionary.getOrientation()); 
    138150    description.setBackground(Configuration.getColor("coloring.editable_background", false)); 
    139151    description.setForeground(Configuration.getColor("coloring.editable_foreground", false)); 
     
    142154     
    143155    JPanel bottom_pane = new JPanel(); 
     156        bottom_pane.setComponentOrientation(Dictionary.getOrientation()); 
    144157    // Base Collection 
    145158    JPanel base_collection_pane = new JPanel(); 
    146     JLabel base_collection_label = new JLabel(Dictionary.get("NewCollectionPrompt.Base_Collection")); 
    147     base_collection = new JComboBox(base_collection_model); 
     159        base_collection_pane.setComponentOrientation(Dictionary.getOrientation()); 
     160     
     161        JLabel base_collection_label = new JLabel(Dictionary.get("NewCollectionPrompt.Base_Collection")); 
     162        base_collection_label.setComponentOrientation(Dictionary.getOrientation()); 
     163     
     164        base_collection = new JComboBox(base_collection_model); 
     165        base_collection.setComponentOrientation(Dictionary.getOrientation());     
    148166    base_collection.setOpaque(false); 
    149167    base_collection.setToolTipText(Dictionary.get("NewCollectionPrompt.Base_Collection_Tooltip")); 
    150168     
    151169    JPanel collection_scope_pane = new JPanel(); 
    152     personal_collection_button = new JRadioButton(Dictionary.get("NewCollectionPrompt.Collection_Scope_Personal")); 
     170        collection_scope_pane.setComponentOrientation(Dictionary.getOrientation()); 
     171     
     172        personal_collection_button = new JRadioButton(Dictionary.get("NewCollectionPrompt.Collection_Scope_Personal")); 
    153173        personal_collection_button.setToolTipText(Dictionary.get("NewCollectionPrompt.Collection_Scope_Personal_Tooltip")); 
    154174    personal_collection_button.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 
    155175    personal_collection_button.setOpaque(false); 
    156     JRadioButton shared_collection_button = new JRadioButton(Dictionary.get("NewCollectionPrompt.Collection_Scope_Shared")); 
     176        personal_collection_button.setComponentOrientation(Dictionary.getOrientation()); 
     177     
     178        JRadioButton shared_collection_button = new JRadioButton(Dictionary.get("NewCollectionPrompt.Collection_Scope_Shared"));         
    157179    shared_collection_button.setToolTipText(Dictionary.get("NewCollectionPrompt.Collection_Scope_Shared_Tooltip"));  
    158180    shared_collection_button.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 
    159181    shared_collection_button.setOpaque(false); 
    160     ButtonGroup collection_scope_group = new ButtonGroup(); 
     182        shared_collection_button.setComponentOrientation(Dictionary.getOrientation()); 
     183     
     184        ButtonGroup collection_scope_group = new ButtonGroup(); 
    161185    collection_scope_group.add(personal_collection_button); 
    162186    collection_scope_group.add(shared_collection_button); 
     
    164188 
    165189    JPanel button_pane = new JPanel(); 
     190        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    166191    create_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip")); 
    167192    JButton cancel_button = new GLIButton(Dictionary.get("General.Cancel"), Dictionary.get("General.Cancel_Tooltip")); 
     
    174199    // Layout 
    175200    title_pane.setLayout(new BorderLayout(5,0)); 
    176     title_pane.add(title_label, BorderLayout.WEST); 
     201    title_pane.add(title_label, BorderLayout.LINE_START); 
    177202    title_pane.add(title, BorderLayout.CENTER); 
    178203 
     
    181206    upper_pane.add(title_pane); 
    182207 
     208        JScrollPane scrol_tmp; 
     209         
    183210    description_pane.setLayout(new BorderLayout()); 
    184     description_pane.add(description_label, BorderLayout.NORTH); 
    185     description_pane.add(new JScrollPane(description), BorderLayout.CENTER); 
     211    description_pane.add(description_label, BorderLayout.NORTH);         
     212        scrol_tmp=new JScrollPane(description); 
     213        scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     214    description_pane.add(scrol_tmp, BorderLayout.CENTER); 
    186215 
    187216    base_collection_pane.setLayout(new BorderLayout(5,0)); 
    188     base_collection_pane.add(base_collection_label, BorderLayout.WEST); 
     217    base_collection_pane.add(base_collection_label, BorderLayout.LINE_START); 
    189218    base_collection_pane.add(base_collection, BorderLayout.CENTER); 
    190219 
     
    342371        if(title_final.length() == 0) { 
    343372        JOptionPane jOptionPane=new JOptionPane(); 
     373                jOptionPane.setComponentOrientation(Dictionary.getOrientation()); 
    344374        jOptionPane.setOpaque(!Utility.isMac()); 
    345375        jOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("NewCollectionPrompt.Title_Error"), Dictionary.get("NewCollectionPrompt.Error"), JOptionPane.ERROR_MESSAGE); 
     
    350380        if(titleClashes(title_final, null)) { 
    351381            JOptionPane jOptionPane=new JOptionPane(); 
     382                    jOptionPane.setComponentOrientation(Dictionary.getOrientation()); 
    352383            jOptionPane.setOpaque(!Utility.isMac()); 
    353384            if (jOptionPane.showConfirmDialog(Gatherer.g_man, Dictionary.get("NewCollectionPrompt.Title_Clash"), Dictionary.get("General.Warning"), JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) { 
  • gli/trunk/src/org/greenstone/gatherer/gui/NewFolderOrFilePrompt.java

    r12119 r18370  
    6262    public NewFolderOrFilePrompt(CollectionTreeNode node, int type, String extension) { 
    6363    super(Gatherer.g_man, true); 
     64        this.setComponentOrientation(Dictionary.getOrientation()); 
    6465    if (type == FileManager.FILE_TYPE) { 
    6566        setTitle(Dictionary.get("NewFolderOrFilePrompt.Title_File")); 
     
    8788    setSize(SIZE); 
    8889    JPanel content_pane = (JPanel) getContentPane(); 
    89  
     90        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
     91         
    9092    JPanel labels_pane = new JPanel(); 
     93        labels_pane.setComponentOrientation(Dictionary.getOrientation()); 
    9194    JPanel fields_pane = new JPanel(); 
     95        fields_pane.setComponentOrientation(Dictionary.getOrientation()); 
    9296    JPanel info_pane = new JPanel(); 
     97        info_pane.setComponentOrientation(Dictionary.getOrientation()); 
    9398 
    9499    JLabel destination_label = new JLabel(Dictionary.get("NewFolderOrFilePrompt.Destination_Name")); 
    95  
     100        destination_label.setComponentOrientation(Dictionary.getOrientation()); 
     101         
    96102    JTextField destination_textfield = new JTextField(node.getFile().getName()); 
     103        destination_textfield.setComponentOrientation(Dictionary.getOrientation()); 
    97104    destination_textfield.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 
    98105    destination_textfield.setEditable(false); 
    99106     
    100107    JLabel name_label = new JLabel(); 
     108        name_label.setComponentOrientation(Dictionary.getOrientation());; 
    101109    name_field = new JTextField(getAutomaticName()); 
     110        name_field.setComponentOrientation(Dictionary.getOrientation()); 
    102111    if (type == FileManager.FILE_TYPE) { 
    103112        name_label.setText(Dictionary.get("NewFolderOrFilePrompt.File_Name")); 
     
    108117    } 
    109118    JPanel button_pane = new JPanel(); 
     119        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    110120    ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip")); 
    111121     
     
    126136     
    127137    info_pane.setLayout(new BorderLayout(5,0)); 
    128     info_pane.add(labels_pane, BorderLayout.WEST); 
     138    info_pane.add(labels_pane, BorderLayout.LINE_START); 
    129139    info_pane.add(fields_pane, BorderLayout.CENTER); 
    130140 
  • gli/trunk/src/org/greenstone/gatherer/gui/NonWhitespaceField.java

    r5589 r18370  
    3333import javax.swing.*; 
    3434import javax.swing.text.*; 
     35import org.greenstone.gatherer.Dictionary; 
     36 
    3537/** A JTextField that doesn't allow whitespace characters.  
    3638 * @author John Thompson, Greenstone Digital Library, University of Waikato 
     
    4244    public NonWhitespaceField() { 
    4345    super(); 
     46        this.setComponentOrientation(Dictionary.getOrientation()); 
    4447    } 
    4548 
    4649    public NonWhitespaceField(String text) { 
    4750    super(text); 
     51        this.setComponentOrientation(Dictionary.getOrientation()); 
    4852    } 
    4953  
    5054    protected Document createDefaultModel() { 
    51     return new NonWhitespaceDocument(); 
     55    return new NonWhitespaceDocument();         
    5256    } 
    5357  
  • gli/trunk/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java

    r16267 r18370  
    6767    super(Gatherer.g_man, "", true); 
    6868    setJMenuBar(new SimpleMenuBar("openingacollection")); 
     69        this.setComponentOrientation(Dictionary.getOrientation()); 
    6970    setSize(SIZE); 
    7071    setTitle(Dictionary.get("OpenCollectionDialog.Title")); 
     
    7273    // Creation 
    7374    JPanel content_pane = (JPanel) getContentPane(); 
    74  
     75        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
     76         
    7577    JPanel center_pane = new JPanel(); 
    76  
     78        center_pane.setComponentOrientation(Dictionary.getOrientation()); 
     79         
    7780    JPanel collection_list_pane = new JPanel(); 
     81        collection_list_pane.setComponentOrientation(Dictionary.getOrientation()); 
    7882    JLabel collection_list_label = new JLabel(Dictionary.get("OpenCollectionDialog.Available_Collections")); 
     83        collection_list_label.setComponentOrientation(Dictionary.getOrientation()); 
    7984    collection_list = new JList(new CollectionListModel()); 
     85        collection_list.setComponentOrientation(Dictionary.getOrientation()); 
     86         
    8087    description_pane = new JPanel(); 
     88        description_pane.setComponentOrientation(Dictionary.getOrientation()); 
    8189    card_layout = new CardLayout(); 
    82  
     90         
    8391    JPanel blank_pane = new JPanel(); 
    84  
     92        blank_pane.setComponentOrientation(Dictionary.getOrientation()); 
     93         
    8594    JPanel description_textarea_pane = new JPanel(); 
     95        description_textarea_pane.setComponentOrientation(Dictionary.getOrientation()); 
    8696    JLabel description_textarea_label = new JLabel(Dictionary.get("OpenCollectionDialog.Description")); 
     97        description_textarea_label.setComponentOrientation(Dictionary.getOrientation()); 
    8798    description_textarea = new JTextArea(); 
    88  
     99        description_textarea.setComponentOrientation(Dictionary.getOrientation()); 
     100         
    89101    JPanel button_pane = new JPanel(); 
     102        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    90103    open_button = new GLIButton(Dictionary.get("OpenCollectionDialog.Open"), Dictionary.get("OpenCollectionDialog.Open_Tooltip")); 
    91104    open_button.setEnabled(false); 
     
    102115 
    103116    // Layout 
     117        JScrollPane scrol_tmp; 
     118         
    104119    collection_list_pane.setLayout(new BorderLayout()); 
    105120    collection_list_pane.add(collection_list_label, BorderLayout.NORTH); 
    106     collection_list_pane.add(new JScrollPane(collection_list), BorderLayout.CENTER); 
     121        scrol_tmp = new JScrollPane(collection_list); 
     122        scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     123    collection_list_pane.add(scrol_tmp, BorderLayout.CENTER); 
    107124 
    108125    description_textarea_pane.setLayout(new BorderLayout()); 
    109126    description_textarea_pane.add(description_textarea_label, BorderLayout.NORTH); 
    110     description_textarea_pane.add(new JScrollPane(description_textarea), BorderLayout.CENTER); 
     127    scrol_tmp =new JScrollPane(description_textarea); 
     128        scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     129        description_textarea_pane.add(scrol_tmp, BorderLayout.CENTER); 
    111130 
    112131    description_pane.setLayout(card_layout); 
     
    119138 
    120139    button_pane.setLayout(new GridLayout(1,4)); 
    121     button_pane.add(new JPanel()); 
     140        JPanel tmp =new JPanel(); 
     141        tmp.setComponentOrientation(Dictionary.getOrientation()); 
     142    button_pane.add(tmp); 
    122143    button_pane.add(open_button); 
    123144    button_pane.add(cancel_button); 
     
    348369        } 
    349370    } 
    350  
    351371    } 
    352372 
  • gli/trunk/src/org/greenstone/gatherer/gui/OptionsPane.java

    r16133 r18370  
    102102    this.current_controls = new ArrayList(); 
    103103    this.writing_documents = new Vector(); 
    104  
     104        this.setComponentOrientation(Dictionary.getOrientation()); 
     105         
    105106    // Have to do this here, not in display, as the message log view may not have been displayed yet. 
    106107    log_textarea = new JTextArea(); 
     108        log_textarea.setComponentOrientation(Dictionary.getOrientation()); 
    107109    log_textarea.setEditable(false); 
    108110    } 
     
    152154      if(pane == null || current_mode >= Configuration.EXPERT_MODE) { 
    153155        pane = new JPanel(); 
     156        pane.setComponentOrientation(Dictionary.getOrientation()); 
    154157        pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 
    155158        pane.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 
     
    275278    if(pane == null || current_mode >= Configuration.EXPERT_MODE) { 
    276279        pane = new JPanel(); 
     280            pane.setComponentOrientation(Dictionary.getOrientation()); 
    277281        pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 
    278282        pane.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 
     
    308312    if (log_pane == null) { 
    309313        log_pane = new JPanel(new BorderLayout()); 
    310  
     314            log_pane.setComponentOrientation(Dictionary.getOrientation()); 
    311315        // Build a list of the log files available, ordering by last modified. Log files are like build_log.date.txt 
    312316        DefaultListModel contents = new DefaultListModel(); 
     
    337341 
    338342        log_list = new JList(contents); 
     343            log_list.setComponentOrientation(Dictionary.getOrientation()); 
    339344        log_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); 
    340345        log_list.setLayoutOrientation(JList.VERTICAL); 
     
    344349 
    345350        JLabel log_history_label = new JLabel(Dictionary.get("OptionsPane.LogHistory")); 
    346         JPanel log_history_pane = new JPanel(); 
     351        log_history_label.setComponentOrientation(Dictionary.getOrientation()); 
     352            JPanel log_history_pane = new JPanel(); 
     353            log_history_pane.setComponentOrientation(Dictionary.getOrientation()); 
    347354        log_history_pane.setPreferredSize(new Dimension(600, 100)); 
    348355        log_history_pane.setLayout(new BorderLayout()); 
    349356        log_history_pane.add(log_history_label, BorderLayout.NORTH); 
    350         log_history_pane.add(new JScrollPane(log_list), BorderLayout.CENTER); 
     357            JScrollPane scrol_tmp=new JScrollPane(log_list); 
     358            scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     359        log_history_pane.add(scrol_tmp, BorderLayout.CENTER); 
    351360         
    352         log_pane.add(new JScrollPane(log_textarea), BorderLayout.CENTER); 
     361            scrol_tmp=new JScrollPane(log_textarea); 
     362            scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     363        log_pane.add(scrol_tmp, BorderLayout.CENTER); 
    353364        log_pane.add(log_history_pane, BorderLayout.SOUTH); 
    354365    } 
  • gli/trunk/src/org/greenstone/gatherer/gui/Preferences.java

    r17612 r18370  
    111111    // Creation 
    112112    JPanel content_pane = (JPanel) getContentPane(); 
     113        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
    113114    tab_pane = new JTabbedPane(); 
     115        tab_pane.setComponentOrientation(Dictionary.getOrientation()); 
    114116    JPanel general_preferences = createGeneralPreferences(); 
     117        general_preferences.setComponentOrientation(Dictionary.getOrientation()); 
    115118    tab_pane.addTab(Dictionary.get("Preferences.General"), null, general_preferences, Dictionary.get("Preferences.General_Tooltip"));  
    116119    tab_pane.addTab(Dictionary.get("Preferences.Mode"), null, createModePreferences(), Dictionary.get("Preferences.Mode_Tooltip")); 
    117120    //  tab_pane.addTab(Dictionary.get("Preferences.Workflow"), null, createWorkflowPreferences(), Dictionary.get("Preferences.Workflow_Tooltip"));  
    118121    JPanel connection_preferences = createConnectionPreferences(); 
     122        connection_preferences.setComponentOrientation(Dictionary.getOrientation()); 
    119123    tab_pane.addTab(Dictionary.get("Preferences.Connection"), null, connection_preferences, Dictionary.get("Preferences.Connection_Tooltip"));  
    120124    tab_pane.addTab(Dictionary.get("Preferences.Warnings"), null, createWarningPreferences(), Dictionary.get("Preferences.Warnings_Tooltip"));  
    121125     
    122126    JPanel button_pane = new JPanel(); 
     127        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    123128    ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip")); 
    124129     
     
    138143    button_pane.add(apply_button); 
    139144    button_pane.add(cancel_button); 
    140  
     145        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
     146         
    141147    content_pane.setLayout(new BorderLayout()); 
    142148    content_pane.add(tab_pane, BorderLayout.CENTER); 
    143149    content_pane.add(button_pane, BorderLayout.SOUTH); 
    144  
     150        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
     151         
    145152    Dimension frame_size = Gatherer.g_man.getSize(); 
    146153    Point frame_location = Gatherer.g_man.getLocation(); 
     
    171178    private JPanel createConnectionPreferences() { 
    172179    JPanel program_pane = new JPanel(); 
     180        program_pane.setComponentOrientation(Dictionary.getOrientation()); 
    173181    program_pane.setPreferredSize(ROW_SIZE); 
    174182    JLabel program_label = new JLabel(Dictionary.get("Preferences.Connection.ProgramCommand")); 
    175183    program_label.setPreferredSize(LABEL_SIZE); 
    176      
     184    program_label.setComponentOrientation(Dictionary.getOrientation()); 
     185         
    177186    program_field = new JTextField(Configuration.getPreviewCommand()); 
    178187    program_field.setCaretPosition(0); 
    179188    program_field.setToolTipText(Dictionary.get("Preferences.Connection.ProgramCommand_Tooltip")); 
    180      
     189    program_field.setComponentOrientation(Dictionary.getOrientation()); 
     190         
    181191    JPanel library_path_pane = new JPanel(); 
    182192    library_path_pane.setPreferredSize(ROW_SIZE); 
     193        library_path_pane.setComponentOrientation(Dictionary.getOrientation()); 
    183194    JLabel library_path_label = new JLabel(); 
    184195    library_path_label.setPreferredSize(LABEL_SIZE); 
     196        library_path_label.setComponentOrientation(Dictionary.getOrientation()); 
    185197    String library_url_string = ""; 
    186198    if (Configuration.library_url != null) { 
     
    189201    library_path_field = new JTextField(library_url_string); 
    190202    library_path_field.setCaretPosition(0); 
     203        library_path_field.setComponentOrientation(Dictionary.getOrientation()); 
    191204    if (Gatherer.GS3) { 
    192205        library_path_label.setText(Dictionary.get("Preferences.Connection.Library_Path_GS3")); 
     
    208221        gliserver_url_label = new JLabel(Dictionary.get("Preferences.Connection.GLIServer_URL")); 
    209222        gliserver_url_label.setPreferredSize(LABEL_SIZE); 
     223            gliserver_url_label.setComponentOrientation(Dictionary.getOrientation()); 
    210224        String gliserver_url_string = ""; 
    211225        if (Configuration.gliserver_url != null) { 
     
    213227        } 
    214228        gliserver_url_field = new JTextField(gliserver_url_string); 
     229            gliserver_url_field.setComponentOrientation(Dictionary.getOrientation()); 
    215230        gliserver_url_field.setCaretPosition(0); 
    216231        gliserver_url_field.setToolTipText(Dictionary.get("Preferences.Connection.GLIServer_URL_Tooltip")); 
    217          
     232        
    218233        // Disable this field when using the applet, as it is automatically determined 
    219234        gliserver_url_label.setEnabled(!Gatherer.isApplet); 
     
    228243        site_pane = new JPanel(); 
    229244        site_pane.setPreferredSize(ROW_SIZE); 
     245            site_pane.setComponentOrientation(Dictionary.getOrientation()); 
    230246        site_label = new JLabel(Dictionary.get("Preferences.Connection.Site")); 
    231247        site_label.setPreferredSize(LABEL_SIZE); 
     248            site_label.setComponentOrientation(Dictionary.getOrientation()); 
    232249        // what should we do if Gatherer.servlet_config.getSites() is null? 
    233250        site_combobox = new JComboBox(Gatherer.servlet_config.getSites().toArray()); 
    234251        site_combobox.setOpaque(false); 
    235252        site_combobox.setToolTipText(Dictionary.get("Preferences.Connection.Site_Tooltip")); 
    236          
     253        site_combobox.setComponentOrientation(Dictionary.getOrientation()); 
     254             
    237255        servlet_pane = new JPanel(); 
    238256        servlet_pane.setPreferredSize(ROW_SIZE); 
     257            servlet_pane.setComponentOrientation(Dictionary.getOrientation()); 
     258             
    239259        servlet_label = new JLabel(Dictionary.get("Preferences.Connection.Servlet")); 
    240260        servlet_label.setPreferredSize(LABEL_SIZE); 
     261            servlet_label.setComponentOrientation(Dictionary.getOrientation()); 
    241262        servlet_combobox = new JComboBox(); 
    242263        servlet_combobox.setOpaque(false); 
     264            servlet_combobox.setComponentOrientation(Dictionary.getOrientation()); 
    243265        // try to locate and select the current site 
    244266        String this_site = Configuration.site_name; 
     
    281303    // Creation 
    282304    JPanel connection_pane = new JPanel(); 
     305        connection_pane.setComponentOrientation(Dictionary.getOrientation()); 
    283306    use_proxy_checkbox = new JCheckBox(Dictionary.get("Preferences.Connection.Use_Proxy")); 
    284307    use_proxy_checkbox.setSelected(currently_enabled); 
    285      
     308    use_proxy_checkbox.setComponentOrientation(Dictionary.getOrientation());         
    286309    use_proxy_checkbox.setPreferredSize(ROW_SIZE); 
    287     JPanel proxy_host_pane = new JPanel(); 
     310     
     311        JPanel proxy_host_pane = new JPanel(); 
     312        proxy_host_pane.setComponentOrientation(Dictionary.getOrientation()); 
    288313    proxy_host_pane.setPreferredSize(ROW_SIZE); 
     314         
    289315    JLabel proxy_host_label = new JLabel(Dictionary.get("Preferences.Connection.Proxy_Host")); 
     316        proxy_host_label.setComponentOrientation(Dictionary.getOrientation()); 
    290317    proxy_host_label.setPreferredSize(LABEL_SIZE); 
    291318     
     
    293320    proxy_host_field.setEnabled(currently_enabled); 
    294321    proxy_host_field.setToolTipText(Dictionary.get("Preferences.Connection.Proxy_Host_Tooltip")); 
    295      
     322    proxy_host_field.setComponentOrientation(Dictionary.getOrientation()); 
     323         
    296324    JPanel proxy_port_pane = new JPanel(); 
     325        proxy_port_pane.setComponentOrientation(Dictionary.getOrientation()); 
    297326    proxy_port_pane.setPreferredSize(ROW_SIZE); 
     327         
    298328    JLabel proxy_port_label = new JLabel(Dictionary.get("Preferences.Connection.Proxy_Port")); 
    299329    proxy_port_label.setPreferredSize(LABEL_SIZE); 
     330        proxy_port_label.setComponentOrientation(Dictionary.getOrientation()); 
    300331     
    301332    String port_value = Configuration.getString("general.proxy_port", true); 
     
    317348    // Layout 
    318349    program_pane.setLayout(new BorderLayout()); 
    319     program_pane.add(program_label, BorderLayout.WEST); 
     350    program_pane.add(program_label, BorderLayout.LINE_END); 
    320351    program_pane.add(program_field, BorderLayout.CENTER); 
    321352 
    322353    library_path_pane.setLayout(new BorderLayout()); 
    323     library_path_pane.add(library_path_label, BorderLayout.WEST); 
     354    library_path_pane.add(library_path_label, BorderLayout.LINE_START); 
    324355    library_path_pane.add(library_path_field, BorderLayout.CENTER); 
    325356 
    326357    if (Gatherer.isGsdlRemote && !Gatherer.GS3) { 
    327358        gliserver_url_pane.setLayout(new BorderLayout()); 
    328         gliserver_url_pane.add(gliserver_url_label, BorderLayout.WEST); 
     359        gliserver_url_pane.add(gliserver_url_label, BorderLayout.LINE_START); 
    329360        gliserver_url_pane.add(gliserver_url_field, BorderLayout.CENTER); 
    330361    } 
     
    332363    if (Gatherer.GS3) { 
    333364        site_pane.setLayout(new BorderLayout()); 
    334         site_pane.add(site_label, BorderLayout.WEST); 
     365        site_pane.add(site_label, BorderLayout.LINE_START); 
    335366        site_pane.add(site_combobox, BorderLayout.CENTER); 
    336367 
    337368        servlet_pane.setLayout(new BorderLayout()); 
    338         servlet_pane.add(servlet_label, BorderLayout.WEST); 
     369        servlet_pane.add(servlet_label, BorderLayout.LINE_START); 
    339370        servlet_pane.add(servlet_combobox, BorderLayout.CENTER); 
    340371    } 
    341372 
    342373    proxy_host_pane.setLayout(new BorderLayout()); 
    343     proxy_host_pane.add(proxy_host_label, BorderLayout.WEST); 
     374    proxy_host_pane.add(proxy_host_label, BorderLayout.LINE_START); 
    344375    proxy_host_pane.add(proxy_host_field, BorderLayout.CENTER); 
    345376 
    346377    proxy_port_pane.setLayout(new BorderLayout()); 
    347     proxy_port_pane.add(proxy_port_label, BorderLayout.WEST); 
     378    proxy_port_pane.add(proxy_port_label, BorderLayout.LINE_START); 
    348379    proxy_port_pane.add(proxy_port_field, BorderLayout.CENTER); 
    349380 
     
    368399    private JPanel createGeneralPreferences() { 
    369400    JPanel general_pane = new JPanel(); 
    370  
     401        general_pane.setComponentOrientation(Dictionary.getOrientation()); 
    371402    // Build the model of available languages 
    372403    ArrayList dictionary_model = new ArrayList(); 
     
    393424    // Users email 
    394425    JPanel email_pane = new JPanel(); 
    395     JLabel email_label = new JLabel(Dictionary.get("Preferences.General.Email")); 
     426        email_pane.setComponentOrientation(Dictionary.getOrientation()); 
     427 
     428        JLabel email_label = new JLabel(Dictionary.get("Preferences.General.Email")); 
     429        email_label.setComponentOrientation(Dictionary.getOrientation()); 
    396430    email_label.setPreferredSize(LABEL_SIZE); 
    397     email_field = new EmailField(Configuration.getColor("coloring.error_background", false)); 
     431     
     432        email_field = new EmailField(Configuration.getColor("coloring.error_background", false)); 
    398433    email_field.setText(Configuration.getEmail()); 
    399434    email_field.setToolTipText(Dictionary.get("Preferences.General.Email_Tooltip")); 
    400      
     435    email_field.setComponentOrientation(Dictionary.getOrientation()); 
    401436    // Font selection 
    402437    JPanel font_pane = new JPanel(); 
    403     JLabel font_label = new JLabel(Dictionary.get("Preferences.General.Font")); 
     438        font_pane.setComponentOrientation(Dictionary.getOrientation()); 
     439     
     440        JLabel font_label = new JLabel(Dictionary.get("Preferences.General.Font")); 
     441        font_label.setComponentOrientation(Dictionary.getOrientation()); 
    404442    font_label.setPreferredSize(LABEL_SIZE); 
    405     font_field = new JTextField(Configuration.getString("general.font", true)); 
     443     
     444        font_field = new JTextField(Configuration.getString("general.font", true)); 
    406445    font_field.setToolTipText(Dictionary.get("Preferences.General.Font_Tooltip")); 
    407      
     446    font_field.setComponentOrientation(Dictionary.getOrientation()); 
     447         
    408448    // Extracted metadata 
    409449    view_extracted_metadata_checkbox = new JCheckBox(Dictionary.get("Preferences.General.View_Extracted_Metadata")); 
    410450    view_extracted_metadata_checkbox.setSelected(false); 
    411     if (Configuration.get("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC)) { 
     451        view_extracted_metadata_checkbox.setComponentOrientation(Dictionary.getOrientation()); 
     452     
     453        if (Configuration.get("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC)) { 
    412454        view_extracted_metadata_checkbox.setSelected(true); 
    413455    } 
    414456    view_extracted_metadata_checkbox.setToolTipText(Dictionary.get("Preferences.General.View_Extracted_Metadata_Tooltip")); 
    415      
     457        view_extracted_metadata_checkbox.setComponentOrientation(Dictionary.getOrientation()); 
     458         
    416459    // Show file sizes 
    417460    show_file_size_checkbox = new JCheckBox(Dictionary.get("Preferences.General.Show_File_Size")); 
    418461    show_file_size_checkbox.setSelected(false); 
     462        show_file_size_checkbox.setComponentOrientation(Dictionary.getOrientation()); 
     463         
    419464    if (Configuration.get("general.show_file_size", Configuration.COLLECTION_SPECIFIC)) { 
    420465        show_file_size_checkbox.setSelected(true); 
     
    424469    // Language 
    425470    JPanel language_pane = new JPanel(); 
    426     JLabel language_label = new JLabel(Dictionary.get("Preferences.General.Interface_Language")); 
     471        language_pane.setComponentOrientation(Dictionary.getOrientation()); 
     472 
     473        JLabel language_label = new JLabel(Dictionary.get("Preferences.General.Interface_Language")); 
     474        language_label.setComponentOrientation(Dictionary.getOrientation()); 
    427475    language_label.setPreferredSize(LABEL_SIZE); 
    428476     
     
    430478    language_combobox.setOpaque(false); 
    431479    language_combobox.setToolTipText(Dictionary.get("Preferences.General.Interface_Language_Tooltip")); 
    432      
     480    language_combobox.setComponentOrientation(Dictionary.getOrientation()); 
     481         
    433482    // Try to locate and select the current language 
    434483    String language_code = Configuration.getLanguage(); 
     
    443492    // Layout 
    444493    email_pane.setLayout(new BorderLayout()); 
    445     email_pane.add(email_label, BorderLayout.WEST); 
     494    email_pane.add(email_label, BorderLayout.LINE_START); 
    446495    email_pane.add(email_field, BorderLayout.CENTER); 
    447496 
    448497    language_pane.setLayout(new BorderLayout()); 
    449     language_pane.add(language_label, BorderLayout.WEST); 
     498    language_pane.add(language_label, BorderLayout.LINE_START); 
    450499    language_pane.add(language_combobox, BorderLayout.CENTER); 
    451500 
    452501    font_pane.setLayout(new BorderLayout()); 
    453     font_pane.add(font_label, BorderLayout.WEST); 
     502    font_pane.add(font_label, BorderLayout.LINE_START); 
    454503    font_pane.add(font_field, BorderLayout.CENTER); 
    455504 
     
    471520    // Create Controls 
    472521    JPanel mode_panel = new JPanel(); 
    473     JPanel button_panel = new JPanel(); 
    474     ButtonGroup mode_button_group = new ButtonGroup(); 
    475     assistant_mode_radio_button = new JRadioButton(Dictionary.get("Preferences.Mode.Assistant")); 
     522        mode_panel.setComponentOrientation(Dictionary.getOrientation()); 
     523     
     524        JPanel button_panel = new JPanel(); 
     525        button_panel.setComponentOrientation(Dictionary.getOrientation()); 
     526     
     527        ButtonGroup mode_button_group = new ButtonGroup(); 
     528     
     529        assistant_mode_radio_button = new JRadioButton(Dictionary.get("Preferences.Mode.Assistant")); 
    476530    assistant_mode_radio_button.setOpaque(false); 
     531        assistant_mode_radio_button.setComponentOrientation(Dictionary.getOrientation()); 
    477532    mode_button_group.add(assistant_mode_radio_button); 
    478     expert_mode_radio_button = new JRadioButton(Dictionary.get("Preferences.Mode.Expert")); 
     533     
     534        expert_mode_radio_button = new JRadioButton(Dictionary.get("Preferences.Mode.Expert")); 
    479535    expert_mode_radio_button.setOpaque(false); 
     536        expert_mode_radio_button.setComponentOrientation(Dictionary.getOrientation()); 
    480537    mode_button_group.add(expert_mode_radio_button); 
    481     librarian_mode_radio_button = new JRadioButton(Dictionary.get("Preferences.Mode.Librarian")); 
     538     
     539        librarian_mode_radio_button = new JRadioButton(Dictionary.get("Preferences.Mode.Librarian")); 
    482540    librarian_mode_radio_button.setOpaque(false); 
     541        librarian_mode_radio_button.setComponentOrientation(Dictionary.getOrientation()); 
    483542    mode_button_group.add(librarian_mode_radio_button); 
    484     systems_mode_radio_button = new JRadioButton(Dictionary.get("Preferences.Mode.Systems")); 
     543     
     544        systems_mode_radio_button = new JRadioButton(Dictionary.get("Preferences.Mode.Systems")); 
    485545    systems_mode_radio_button.setOpaque(false); 
     546        systems_mode_radio_button.setComponentOrientation(Dictionary.getOrientation()); 
    486547    mode_button_group.add(systems_mode_radio_button); 
    487     mode_description_textarea = new JTextArea(); 
     548     
     549        mode_description_textarea = new JTextArea(); 
     550        mode_description_textarea.setComponentOrientation(Dictionary.getOrientation()); 
    488551    mode_description_textarea.setEditable(false); 
    489552    mode_description_textarea.setLineWrap(true); 
     
    535598    { 
    536599    warning_preferences_check_list = new CheckList(false); 
     600        warning_preferences_check_list.setComponentOrientation(Dictionary.getOrientation()); 
    537601 
    538602    // Read all the warnings from the general xml/config.xml file, and their values from the user config.xml file 
     
    552616 
    553617    JPanel warning_preferences_pane = new JPanel(); 
     618        warning_preferences_pane.setComponentOrientation(Dictionary.getOrientation()); 
    554619    warning_preferences_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 
    555620    warning_preferences_pane.setLayout(new BorderLayout()); 
    556     warning_preferences_pane.add(new JScrollPane(warning_preferences_check_list), BorderLayout.CENTER); 
     621        JScrollPane scrol_tmp = new JScrollPane(warning_preferences_check_list); 
     622        scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     623    warning_preferences_pane.add(scrol_tmp, BorderLayout.CENTER); 
    557624    return warning_preferences_pane; 
    558625    } 
     
    571638    // Creation 
    572639    JPanel workflow_preferences_pane = new JPanel(); 
    573     JPanel checklist_pane = new JPanel(); 
    574     JLabel title_label = new JLabel(Dictionary.get("Preferences.Workflow.Title")); 
     640        workflow_preferences_pane.setComponentOrientation(Dictionary.getOrientation()); 
     641     
     642        JPanel checklist_pane = new JPanel(); 
     643        checklist_pane.setComponentOrientation(Dictionary.getOrientation()); 
     644     
     645        JLabel title_label = new JLabel(Dictionary.get("Preferences.Workflow.Title")); 
     646        title_label.setComponentOrientation(Dictionary.getOrientation()); 
    575647    title_label.setPreferredSize(ROW_SIZE); 
    576648     
    577649    workflow_download = new JCheckBox(Dictionary.get("GUI.Download")+" - "+Dictionary.get("GUI.Download_Tooltip")); 
     650        workflow_download.setComponentOrientation(Dictionary.getOrientation()); 
    578651    workflow_download.setSelected(Configuration.get("workflow.download", false)); 
    579652    workflow_download.setPreferredSize(ROW_SIZE); 
     
    582655    workflow_gather.setSelected(Configuration.get("workflow.gather", false)); 
    583656    workflow_gather.setPreferredSize(ROW_SIZE); 
    584      
     657    workflow_gather.setComponentOrientation(Dictionary.getOrientation()); 
     658         
    585659    workflow_enrich = new JCheckBox(Dictionary.get("GUI.Enrich")+" - "+Dictionary.get("GUI.Enrich_Tooltip")); 
    586660    workflow_enrich.setSelected(Configuration.get("workflow.enrich", false)); 
    587661    workflow_enrich.setPreferredSize(ROW_SIZE); 
    588      
     662    workflow_enrich.setComponentOrientation(Dictionary.getOrientation()); 
     663         
    589664    workflow_design = new JCheckBox(Dictionary.get("GUI.Design")+" - "+Dictionary.get("GUI.Design_Tooltip")); 
    590665    workflow_design.setSelected(Configuration.get("workflow.design", false)); 
    591666    workflow_design.setPreferredSize(ROW_SIZE); 
    592      
     667    workflow_design.setComponentOrientation(Dictionary.getOrientation()); 
     668         
    593669    workflow_create = new JCheckBox(Dictionary.get("GUI.Create")+" - "+Dictionary.get("GUI.Create_Tooltip")); 
    594670    workflow_create.setSelected(Configuration.get("workflow.create", false)); 
    595671    workflow_create.setPreferredSize(ROW_SIZE); 
    596      
    597  
     672    workflow_create.setComponentOrientation(Dictionary.getOrientation()); 
     673         
    598674    workflow_format = new JCheckBox(Dictionary.get("GUI.Format")+" - "+Dictionary.get("GUI.Format_Tooltip")); 
    599675    workflow_format.setSelected(Configuration.get("workflow.format", false)); 
    600676    workflow_format.setPreferredSize(ROW_SIZE); 
    601      
     677    workflow_format.setComponentOrientation(Dictionary.getOrientation()); 
     678         
    602679    JPanel predefined_pane = new JPanel(); 
    603     JLabel predefined_label = new JLabel(Dictionary.get("Preferences.Workflow.Predefined.Label")); 
    604     JComboBox predefined_combobox = new JComboBox(predefined); 
     680        predefined_pane.setComponentOrientation(Dictionary.getOrientation()); 
     681     
     682        JLabel predefined_label = new JLabel(Dictionary.get("Preferences.Workflow.Predefined.Label")); 
     683        predefined_label.setComponentOrientation(Dictionary.getOrientation()); 
     684     
     685        JComboBox predefined_combobox = new JComboBox(predefined);  
    605686    predefined_combobox.setOpaque(false); 
    606687    // Connection 
     
    630711     
    631712    predefined_pane.setLayout(new BorderLayout(5,0)); 
    632     predefined_pane.add(predefined_label, BorderLayout.WEST); 
     713    predefined_pane.add(predefined_label, BorderLayout.LINE_START); 
    633714    predefined_pane.add(predefined_combobox, BorderLayout.CENTER); 
    634715 
  • gli/trunk/src/org/greenstone/gatherer/gui/PreviewCommandDialog.java

    r12119 r18370  
    7171    super(Gatherer.g_man); 
    7272    this.self = this; 
    73            
     73        JScrollPane scrol_tmp; 
     74        this.setComponentOrientation(Dictionary.getOrientation()); 
    7475    // Creation 
    7576    setModal(true); 
     
    7980     
    8081    JPanel content_pane = (JPanel) getContentPane(); 
     82        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
    8183    content_pane.setBackground(Configuration.getColor("coloring.collection_heading_background", false)); 
    8284 
    8385    JTextArea instructions_area = new JTextArea(Dictionary.get("PreviewCommandDialog.Instructions")); 
    84     instructions_area.setEditable(false); 
     86        instructions_area.setComponentOrientation(Dictionary.getOrientation()); 
     87        instructions_area.setEditable(false); 
    8588    instructions_area.setLineWrap(true); 
    8689    instructions_area.setRows(5); 
     
    8891     
    8992    JPanel button_pane = new JPanel(); 
     93        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    9094    JPanel lower_pane = new JPanel(); 
     95        lower_pane.setComponentOrientation(Dictionary.getOrientation()); 
    9196 
    9297    JPanel command_pane = new JPanel(); 
     98        command_pane.setComponentOrientation(Dictionary.getOrientation()); 
    9399    command_field = new JTextField(); 
     100        command_field.setComponentOrientation(Dictionary.getOrientation()); 
    94101    browse_button = new GLIButton(Dictionary.get("FileAssociationDialog.Browse")); 
    95102    browse_button.setEnabled(!Utility.isMac()); 
     
    111118    command_pane.setLayout(new BorderLayout()); 
    112119    command_pane.add(command_field, BorderLayout.CENTER); 
    113     command_pane.add(browse_button, BorderLayout.EAST); 
     120    command_pane.add(browse_button, BorderLayout.LINE_END); 
    114121 
    115122    lower_pane.setBorder(BorderFactory.createEmptyBorder(2,0,0,0)); 
     
    127134    content_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 
    128135    content_pane.setLayout(new BorderLayout()); 
    129     content_pane.add(new JScrollPane(instructions_area), BorderLayout.NORTH); 
     136        scrol_tmp=new JScrollPane(instructions_area); 
     137        scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     138    content_pane.add(scrol_tmp, BorderLayout.NORTH); 
    130139    content_pane.add(lower_pane, BorderLayout.CENTER); 
    131140 
     
    168177    public void actionPerformed(ActionEvent event) { 
    169178        JFileChooser chooser = new JFileChooser(new File(Gatherer.getGLIUserDirectoryPath())); 
     179            chooser.setComponentOrientation(Dictionary.getOrientation()); 
    170180        GUIUtils.disableRename(chooser); 
    171181        chooser.setDialogTitle(Dictionary.get("FileAssociationDialog.Browse_Title")); 
  • gli/trunk/src/org/greenstone/gatherer/gui/RenamePrompt.java

    r12657 r18370  
    5050    { 
    5151    super(Gatherer.g_man, true); 
     52        this.setComponentOrientation(Dictionary.getOrientation()); 
    5253    setTitle(Dictionary.get("RenamePrompt.Title")); 
    5354    name = collection_tree_node.getFile().getName(); 
     
    8788    setSize(SIZE); 
    8889    JPanel content_pane = (JPanel) getContentPane(); 
    89  
     90        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
     91         
    9092    JPanel info_pane = new JPanel(); 
    91  
     93        info_pane.setComponentOrientation(Dictionary.getOrientation()); 
     94         
    9295    JLabel name_label = new JLabel(Dictionary.get("RenamePrompt.Name")); 
     96        name_label.setComponentOrientation(Dictionary.getOrientation()); 
    9397    name_textfield = new JTextField(name); 
     98        name_textfield.setComponentOrientation(Dictionary.getOrientation()); 
    9499 
    95100    JPanel button_pane = new JPanel(); 
     101        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    96102    ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip")); 
    97103    cancel_button = new GLIButton(Dictionary.get("General.Cancel"), Dictionary.get("General.Pure_Cancel_Tooltip")); 
     
    105111    // Layout 
    106112    info_pane.setLayout(new BorderLayout(5,0)); 
    107     info_pane.add(name_label, BorderLayout.WEST); 
     113    info_pane.add(name_label, BorderLayout.LINE_START); 
    108114    info_pane.add(name_textfield, BorderLayout.CENTER); 
    109115 
  • gli/trunk/src/org/greenstone/gatherer/gui/SimpleMenuBar.java

    r12119 r18370  
    1515    public SimpleMenuBar(String page_name) { 
    1616    this.page_name = page_name; 
     17        this.setComponentOrientation(Dictionary.getOrientation()); 
    1718    JMenu help = new JMenu(); 
     19        help.setComponentOrientation(Dictionary.getOrientation()); 
    1820    help.setIcon(JarTools.getImage("help.gif")); 
    1921    help.setText(Dictionary.get("Menu.Help")); 
    2022 
    2123    JMenuItem help_help = new JMenuItem(Dictionary.get("Menu.Help")); 
     24        help_help.setComponentOrientation(Dictionary.getOrientation()); 
    2225    help_help.addActionListener(this); 
    2326     
  • gli/trunk/src/org/greenstone/gatherer/gui/SimpleResultDialog.java

    r17131 r18370  
    5656    super(Gatherer.g_man, title, true); 
    5757    this.self = this; 
    58      
     58    this.setComponentOrientation(Dictionary.getOrientation()); 
     59         
    5960    setUpGUI(label, results); 
    6061  } 
     
    7475     
    7576    JPanel content_pane = (JPanel) getContentPane(); 
     77    content_pane.setComponentOrientation(Dictionary.getOrientation()); 
    7678    JLabel result_label = new JLabel(label); 
     79    result_label.setComponentOrientation(Dictionary.getOrientation()); 
    7780     
    7881    JPanel button_pane = new JPanel(); 
     82    button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    7983    JButton close_button = new GLIButton(Dictionary.get("General.Close")); 
    8084    close_button.addActionListener(new CloseButtonListener()); 
    8185     
    8286    JPanel output_pane = new JPanel(); 
     87    output_pane.setComponentOrientation(Dictionary.getOrientation()); 
    8388    JLabel output_label = new JLabel(Dictionary.get("General.Review_Output")); 
    84          
     89    output_label.setComponentOrientation(Dictionary.getOrientation()); 
     90 
    8591    JTextArea output_textarea = new JTextArea(results); 
     92    output_textarea.setComponentOrientation(Dictionary.getOrientation()); 
    8693    output_textarea.setCaretPosition(0); 
    8794    output_textarea.setEditable(false); 
     
    9097     
    9198    button_pane.setLayout(new BorderLayout()); 
    92     button_pane.add(close_button, BorderLayout.EAST); 
     99    button_pane.add(close_button, BorderLayout.LINE_END); 
    93100     
    94101    output_pane.setBorder(BorderFactory.createEmptyBorder(5,0,5,0)); 
  • gli/trunk/src/org/greenstone/gatherer/gui/URLField.java

    r16965 r18370  
    66import java.util.*; 
    77import java.io.*; 
     8import org.greenstone.gatherer.Dictionary; 
    89import org.greenstone.gatherer.Gatherer; 
    910import org.greenstone.gatherer.Configuration; 
     
    102103    { 
    103104        super(); 
     105         this.setComponentOrientation(Dictionary.getOrientation()); 
    104106        setBackground(background); 
    105107        setForeground(foreground); 
     
    129131        this.setEditable(true); 
    130132        this.getEditor().selectAll(); 
    131          
     133        this.setComponentOrientation(Dictionary.getOrientation()); 
     134 
    132135        setBackground(background); 
    133136        setForeground(foreground); 
  • gli/trunk/src/org/greenstone/gatherer/gui/WarningDialog.java

    r18175 r18370  
    6666    { 
    6767    super(Gatherer.g_man, "Warning", true); 
    68  
     68        this.setComponentOrientation(Dictionary.getOrientation()); 
    6969    this.showcheckbox = showcheckbox;  
    7070 
     
    8484    // Creation 
    8585    JPanel content_pane = (JPanel) getContentPane(); 
     86        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
    8687    JPanel text_pane = new JPanel(); 
    87  
     88        text_pane.setComponentOrientation(Dictionary.getOrientation()); 
     89         
    8890    String gmedium_image = "gatherer_medium.gif"; 
    8991    if (Configuration.fedora_info.isActive()) { 
     
    9294 
    9395    JLabel icon_label = new JLabel(JarTools.getImage(gmedium_image)); 
     96        icon_label.setComponentOrientation(Dictionary.getOrientation()); 
    9497 
    9598    JTextArea text_area = new JTextArea(); 
     99        text_area.setComponentOrientation(Dictionary.getOrientation()); 
    96100    text_area.setEditable(false); 
    97101    text_area.setLineWrap(true); 
     
    101105 
    102106    value_panel = new JPanel(); 
     107        value_panel.setComponentOrientation(Dictionary.getOrientation()); 
    103108    JLabel value_label = new JLabel(Dictionary.get("WarningDialog.Value")); 
    104      
     109    value_label.setComponentOrientation(Dictionary.getOrientation()); 
     110         
    105111    value_field = new JTextField(); 
     112        value_field.setComponentOrientation(Dictionary.getOrientation()); 
    106113    JPanel bottom_pane = new JPanel(); 
     114        bottom_pane.setComponentOrientation(Dictionary.getOrientation()); 
     115         
    107116    JPanel control_pane = new JPanel(); 
     117        control_pane.setComponentOrientation(Dictionary.getOrientation()); 
    108118    ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip")); 
    109119    cancel_button = new GLIButton(Dictionary.get("General.Cancel"), Dictionary.get("General.Pure_Cancel_Tooltip")); 
     
    123133    value_panel.setBorder(BorderFactory.createEmptyBorder(5,0,0,0)); 
    124134    value_panel.setLayout(new BorderLayout(5,0)); 
    125     value_panel.add(value_label, BorderLayout.WEST); 
     135    value_panel.add(value_label, BorderLayout.LINE_START); 
    126136    value_panel.add(value_field, BorderLayout.CENTER); 
    127137 
    128138    text_pane.setLayout(new BorderLayout()); 
    129     text_pane.add(icon_label, BorderLayout.WEST); 
     139    text_pane.add(icon_label, BorderLayout.LINE_START); 
    130140    text_pane.add(new JScrollPane(text_area), BorderLayout.CENTER); 
    131141    if(affected_property != null) { 
     
    140150    else { 
    141151        control_pane.setLayout(new BorderLayout()); 
    142         control_pane.add(ok_button, BorderLayout.EAST); 
     152        control_pane.add(ok_button, BorderLayout.LINE_END); 
    143153    } 
    144154 
    145155    bottom_pane.setBorder(BorderFactory.createEmptyBorder(5,0,0,0)); 
    146156    bottom_pane.setLayout(new BorderLayout()); 
    147     bottom_pane.add(control_pane, BorderLayout.EAST); 
     157    bottom_pane.add(control_pane, BorderLayout.LINE_END); 
    148158    if(showcheckbox) { 
    149159        show_check = new JCheckBox(Dictionary.get("WarningDialog.Dont_Show_Again")); 
     160        show_check.setComponentOrientation(Dictionary.getOrientation()); 
    150161        bottom_pane.add(show_check, BorderLayout.CENTER); 
    151162    } 
  • gli/trunk/src/org/greenstone/gatherer/gui/WriteCDImagePrompt.java

    r14045 r18370  
    118118    public WriteCDImagePrompt() { 
    119119    super(Gatherer.g_man, true); 
     120        this.setComponentOrientation(Dictionary.getOrientation()); 
    120121    cancel_button = new GLIButton(Dictionary.get("General.Close"), Dictionary.get("General.Close_Tooltip")); 
    121122     
    122123    details_textarea = new JTextArea(Dictionary.get("DeleteCollectionPrompt.No_Collection")); 
    123     details_textarea.setEditable(false); 
     124    details_textarea.setComponentOrientation(Dictionary.getOrientation()); 
     125        details_textarea.setEditable(false); 
    124126     
    125127    details_label = new JLabel(Dictionary.get("DeleteCollectionPrompt.Collection_Details")); 
    126      
     128    details_label.setComponentOrientation(Dictionary.getOrientation()); 
     129         
    127130    instructions_textarea = new JTextArea(Dictionary.get("WriteCDImagePrompt.Instructions")); 
     131        instructions_textarea.setComponentOrientation(Dictionary.getOrientation()); 
    128132    instructions_textarea.setCaretPosition(0); 
    129133    instructions_textarea.setEditable(false); 
     
    135139    list = new CheckList(true); 
    136140    list_label = new JLabel(Dictionary.get("DeleteCollectionPrompt.Collection_List")); 
    137      
    138     ok_button = new GLIButton(Dictionary.get("WriteCDImagePrompt.Export"), Dictionary.get("WriteCDImagePrompt.Export_Tooltip")); 
    139      
     141    list_label.setComponentOrientation(Dictionary.getOrientation()); 
     142         
     143    ok_button = new GLIButton(Dictionary.get("WriteCDImagePrompt.Export"), Dictionary.get("WriteCDImagePrompt.Export_Tooltip"));            
     144         
    140145    title_field = new JTextField(); 
     146        title_field.setComponentOrientation(Dictionary.getOrientation()); 
    141147    // Dictionary.setTooltip(title_field, "WriteCDImagePrompt.CD_Name_Tooltip"); 
    142148    title_label = new JLabel(Dictionary.get("WriteCDImagePrompt.CD_Name")); 
    143      
     149    title_label.setComponentOrientation(Dictionary.getOrientation()); 
    144150 
    145151    estimated_size_field = new JTextField(); 
     152        estimated_size_field.setComponentOrientation(Dictionary.getOrientation()); 
    146153    estimated_size_field.setEditable(false); 
    147154 
     
    152159    estimated_size_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 
    153160    estimated_size_label = new JLabel(Dictionary.get("WriteCDImagePrompt.Size_Label")); 
    154      
     161    estimated_size_label.setComponentOrientation(Dictionary.getOrientation()); 
     162         
    155163    scanForCollections(); 
    156     list.setListData(all_collections); 
     164    list.setListData(all_collections);         
    157165 
    158166    prompt = this; 
     
    172180    noinstall_button = new JRadioButton(Dictionary.get("WriteCDImagePrompt.NoInstall")); 
    173181    noinstall_button.setToolTipText(Dictionary.get("WriteCDImagePrompt.NoInstall_Tooltip")); 
    174      
     182    noinstall_button.setComponentOrientation(Dictionary.getOrientation()); 
    175183     
    176184    install_button = new JRadioButton(Dictionary.get("WriteCDImagePrompt.Install")); 
    177185    install_button.setToolTipText(Dictionary.get("WriteCDImagePrompt.Install_Tooltip")); 
    178      
    179  
    180      
     186    install_button.setComponentOrientation(Dictionary.getOrientation()); 
     187         
    181188    } 
    182189 
     
    203210    public boolean display() { 
    204211 
     212        JScrollPane scrol_tmp; 
    205213    // Radio buttons 
    206     ButtonGroup radio_group = new ButtonGroup(); 
     214    ButtonGroup radio_group = new ButtonGroup();         
    207215    radio_group.add(install_button); 
    208216    install_button.setSelected(true); 
     
    211219    // Top pane 
    212220    JPanel instructions_pane = new JPanel(new BorderLayout()); 
     221        instructions_pane.setComponentOrientation(Dictionary.getOrientation()); 
    213222    instructions_pane.setBorder(BorderFactory.createEmptyBorder(5,5,0,5)); 
    214     instructions_pane.add(new JScrollPane(instructions_textarea), BorderLayout.CENTER); 
     223        scrol_tmp = new JScrollPane(instructions_textarea); 
     224        scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     225    instructions_pane.add(scrol_tmp, BorderLayout.CENTER); 
    215226     
    216227    title_label.setBorder(BorderFactory.createEmptyBorder(0,5,0,15)); 
    217228 
    218229    JPanel title_pane = new JPanel(new BorderLayout()); 
    219     title_pane.add(title_label, BorderLayout.WEST); 
     230        title_pane.setComponentOrientation(Dictionary.getOrientation()); 
     231    title_pane.add(title_label, BorderLayout.LINE_START); 
    220232    title_pane.add(title_field, BorderLayout.CENTER); 
    221233    title_pane.setBorder(BorderFactory.createEmptyBorder(5,0,5,0)); 
    222234 
    223235    JPanel radio_pane = new JPanel(new GridLayout(2,1)); 
     236        radio_pane.setComponentOrientation(Dictionary.getOrientation()); 
    224237    install_button.setBackground(Configuration.getColor("coloring.collection_heading_background", true)); 
    225238    noinstall_button.setBackground(Configuration.getColor("coloring.collection_heading_background", true)); 
    226239    radio_pane.add(install_button); 
    227     radio_pane.add(noinstall_button); 
    228      
    229      
     240    radio_pane.add(noinstall_button);        
     241         
    230242    JPanel options_pane = new JPanel(new BorderLayout()); 
     243        options_pane.setComponentOrientation(Dictionary.getOrientation()); 
    231244    options_pane.add(title_pane, BorderLayout.NORTH); 
    232245    options_pane.add(radio_pane, BorderLayout.CENTER); 
     
    235248    // Central pane 
    236249    JPanel list_pane = new JPanel(new BorderLayout()); 
     250        list_pane.setComponentOrientation(Dictionary.getOrientation()); 
    237251    list_pane.add(list_label, BorderLayout.NORTH); 
    238     list_pane.add(new JScrollPane(list), BorderLayout.CENTER); 
     252        scrol_tmp =new JScrollPane(list); 
     253        scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     254    list_pane.add(scrol_tmp, BorderLayout.CENTER); 
    239255    list_pane.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0)); 
    240256 
    241257    JPanel details_pane = new JPanel(new BorderLayout()); 
    242258    details_pane.add(details_label, BorderLayout.NORTH); 
    243     details_pane.add(new JScrollPane(details_textarea), BorderLayout.CENTER); 
     259        scrol_tmp =new JScrollPane(details_textarea); 
     260        scrol_tmp.setComponentOrientation(Dictionary.getOrientation()); 
     261    details_pane.add(scrol_tmp, BorderLayout.CENTER); 
    244262    details_pane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); 
    245  
     263         
    246264    JPanel central_pane = new JPanel(new GridLayout(2, 1)); 
     265        central_pane.setComponentOrientation(Dictionary.getOrientation()); 
    247266    central_pane.add(list_pane); 
    248267    central_pane.add(details_pane); 
     
    251270    // Lower pane 
    252271    JPanel estimated_size_pane = new JPanel(new BorderLayout()); 
    253     estimated_size_pane.add(estimated_size_label, BorderLayout.WEST); 
     272        estimated_size_pane.setComponentOrientation(Dictionary.getOrientation()); 
     273    estimated_size_pane.add(estimated_size_label, BorderLayout.LINE_START); 
    254274    estimated_size_pane.add(estimated_size_field, BorderLayout.CENTER); 
    255275    estimated_size_pane.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0)); 
    256276 
    257277    JPanel button_pane = new JPanel(new GridLayout(1, 2)); 
     278        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    258279    button_pane.add(ok_button); 
    259280    button_pane.add(cancel_button); 
    260281    button_pane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); 
    261  
     282        
    262283    JPanel lower_pane = new JPanel(new BorderLayout()); 
     284        lower_pane.setComponentOrientation(Dictionary.getOrientation()); 
    263285    lower_pane.add(estimated_size_pane, BorderLayout.NORTH); 
    264286    lower_pane.add(button_pane, BorderLayout.SOUTH); 
     
    267289    // Final. 
    268290    JPanel content_pane = (JPanel)this.getContentPane(); 
     291        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
    269292    content_pane.setLayout(new BorderLayout()); 
    270293    content_pane.add(instructions_pane, BorderLayout.NORTH); 
    271294    content_pane.add(central_pane, BorderLayout.CENTER); 
    272295    content_pane.add(lower_pane, BorderLayout.SOUTH); 
    273  
     296         
    274297    // Center and display. 
    275298    Dimension screen_size = Configuration.screen_size; 
     
    600623        public ProgressDialog() { 
    601624        super(Gatherer.g_man, Dictionary.get("WriteCDImagePrompt.Title"), true); 
     625                this.setComponentOrientation(Dictionary.getOrientation()); 
    602626        setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); 
    603627        setSize(size); 
    604628        JPanel content_pane = (JPanel) getContentPane(); 
     629                content_pane.setComponentOrientation(Dictionary.getOrientation()); 
    605630        JLabel progress_label = new JLabel(Dictionary.get("WriteCDImagePrompt.Progress_Label")); 
    606          
     631        progress_label.setComponentOrientation(Dictionary.getOrientation()); 
     632                 
    607633        JProgressBar progress_bar = new JProgressBar(); 
     634                progress_bar.setComponentOrientation(Dictionary.getOrientation()); 
    608635        progress_bar.setIndeterminate(true); 
    609636        content_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 
  • gli/trunk/src/org/greenstone/gatherer/gui/metaaudit/AutofilterDialog.java

    r13195 r18370  
    108108    this.dialog = dialog; 
    109109    this.self = this; 
     110        this.setComponentOrientation(Dictionary.getOrientation()); 
    110111    setModal(true); 
    111112    setJMenuBar(new SimpleMenuBar("reviewingmetadata"));  
     
    115116    // Creation 
    116117    JPanel content_pane = (JPanel) getContentPane(); 
     118        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
    117119    JPanel name_pane = new JPanel(); 
     120        name_pane.setComponentOrientation(Dictionary.getOrientation()); 
    118121    JLabel name_label = new JLabel(Dictionary.get("Autofilter.Name")); 
     122        name_label.setComponentOrientation(Dictionary.getOrientation()); 
    119123    JTextField name_template = new JTextField(); 
     124        name_template.setComponentOrientation(Dictionary.getOrientation()); 
    120125    name = new JLabel(); 
     126        name.setComponentOrientation(Dictionary.getOrientation()); 
    121127    name.setBorder(name_template.getBorder()); 
    122128    control = new JTabbedPane(); 
     129        control.setComponentOrientation(Dictionary.getOrientation()); 
    123130    JPanel value_pane = new JPanel(); 
     131        value_pane.setComponentOrientation(Dictionary.getOrientation()); 
    124132    JPanel inner_value_pane = new JPanel(); 
     133        inner_value_pane.setComponentOrientation(Dictionary.getOrientation()); 
    125134    JLabel value_label = new JLabel(Dictionary.get("Autofilter.eqeq")); 
     135        value_label.setComponentOrientation(Dictionary.getOrientation()); 
    126136    value = new JComboBox(); 
     137        value.setComponentOrientation(Dictionary.getOrientation()); 
    127138    value.setOpaque(false); 
    128139    value.setEditable(false); 
    129140    JPanel custom_pane = new JPanel(); 
     141        custom_pane.setComponentOrientation(Dictionary.getOrientation()); 
    130142 
    131143    JPanel first_pane = new JPanel(); 
     144        first_pane.setComponentOrientation(Dictionary.getOrientation()); 
    132145    first_method = new JComboBox(); 
     146        first_method.setComponentOrientation(Dictionary.getOrientation()); 
    133147    first_method.setOpaque(false); 
    134148    first_value = new JComboBox(); 
     149        first_value.setComponentOrientation(Dictionary.getOrientation()); 
    135150    first_value.setOpaque(false); 
    136151    first_value.setEditable(true); 
     
    138153    first_value.setSelectedItem(""); 
    139154    first_case = new JCheckBox(Dictionary.get("Autofilter.Case_Sensitive")); 
     155        first_case.setComponentOrientation(Dictionary.getOrientation()); 
    140156    JPanel operator_pane = new JPanel(); 
     157        operator_pane.setComponentOrientation(Dictionary.getOrientation()); 
    141158    JLabel operator_label = new JLabel(Dictionary.get("Autofilter.Operator")); 
    142     ButtonGroup operator_group = new ButtonGroup(); 
     159        operator_label.setComponentOrientation(Dictionary.getOrientation()); 
     160    ButtonGroup operator_group = new ButtonGroup();         
    143161    and_radiobutton = new JRadioButton(Dictionary.get("Autofilter.AND")); 
     162        and_radiobutton.setComponentOrientation(Dictionary.getOrientation()); 
    144163    and_radiobutton.setOpaque(false); 
    145164    none_radiobutton = new JRadioButton(Dictionary.get("Autofilter.None")); 
     165        none_radiobutton.setComponentOrientation(Dictionary.getOrientation()); 
    146166    none_radiobutton.setOpaque(false); 
    147167    none_radiobutton.setSelected(true); 
    148168    or_radiobutton = new JRadioButton(Dictionary.get("Autofilter.OR")); 
     169        or_radiobutton.setComponentOrientation(Dictionary.getOrientation()); 
    149170    or_radiobutton.setOpaque(false); 
    150171    operator_group.add(none_radiobutton); 
     
    153174 
    154175    JPanel second_pane = new JPanel(); 
     176        second_pane.setComponentOrientation(Dictionary.getOrientation()); 
    155177    second_method = new JComboBox(); 
     178        second_method.setComponentOrientation(Dictionary.getOrientation()); 
    156179    second_method.setOpaque(false); 
    157180    second_method.setEnabled(false); 
    158181    second_value = new JComboBox(); 
     182        second_value.setComponentOrientation(Dictionary.getOrientation()); 
    159183    second_value.setOpaque(false); 
    160184    second_value.setEditable(true); 
     
    163187    second_value.setSelectedItem(""); 
    164188    second_case = new JCheckBox(Dictionary.get("Autofilter.Case_Sensitive")); 
     189        second_case.setComponentOrientation(Dictionary.getOrientation()); 
    165190    JPanel lower_pane = new JPanel(); 
     191        lower_pane.setComponentOrientation(Dictionary.getOrientation()); 
    166192    JPanel order_pane = new JPanel(); 
     193        order_pane.setComponentOrientation(Dictionary.getOrientation()); 
    167194    order_pane.setToolTipText(Dictionary.get("Autofilter.Order_Tooltip")); 
    168195    JLabel order_label = new JLabel(Dictionary.get("Autofilter.Order")); 
    169      
     196    order_label.setComponentOrientation(Dictionary.getOrientation()); 
    170197    ButtonGroup order_group = new ButtonGroup(); 
    171198    ascending_radiobutton = new JRadioButton(Dictionary.get("Autofilter.Ascending")); 
     199        ascending_radiobutton.setComponentOrientation(Dictionary.getOrientation()); 
    172200    ascending_radiobutton.setOpaque(false); 
    173201    ascending_radiobutton.setSelected(true); 
    174202    descending_radiobutton = new JRadioButton(Dictionary.get("Autofilter.Descending")); 
     203        descending_radiobutton.setComponentOrientation(Dictionary.getOrientation()); 
    175204    descending_radiobutton.setOpaque(false); 
    176205    order_group.add(ascending_radiobutton); 
     
    183212    } 
    184213    JPanel button_pane = new JPanel(); 
     214        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
    185215    cancel_button = new GLIButton(Dictionary.get("General.Cancel"), Dictionary.get("General.Pure_Cancel_Tooltip")); 
    186216    remove_button = new GLIButton(Dictionary.get("Autofilter.Remove"), Dictionary.get("Autofilter.Remove_Tooltip")); 
     
    200230    name_pane.setBorder(BorderFactory.createEmptyBorder(0,0,5,0)); 
    201231    name_pane.setLayout(new BorderLayout()); 
    202     name_pane.add(name_label, BorderLayout.WEST); 
     232    name_pane.add(name_label, BorderLayout.LINE_START); 
    203233    name_pane.add(name, BorderLayout.CENTER); 
    204234 
     
    206236 
    207237    inner_value_pane.setLayout(new BorderLayout()); 
    208     inner_value_pane.add(value_label, BorderLayout.WEST); 
     238    inner_value_pane.add(value_label, BorderLayout.LINE_START); 
    209239    inner_value_pane.add(value, BorderLayout.CENTER); 
    210240 
     
    214244 
    215245    first_pane.setLayout(new BorderLayout()); 
    216     first_pane.add(first_method, BorderLayout.WEST); 
     246    first_pane.add(first_method, BorderLayout.LINE_START); 
    217247    first_pane.add(first_value, BorderLayout.CENTER); 
    218     first_pane.add(first_case, BorderLayout.EAST); 
     248    first_pane.add(first_case, BorderLayout.LINE_END); 
    219249 
    220250    operator_pane.setLayout(new GridLayout(1,4)); 
     
    225255 
    226256    second_pane.setLayout(new BorderLayout()); 
    227     second_pane.add(second_method, BorderLayout.WEST); 
     257    second_pane.add(second_method, BorderLayout.LINE_START); 
    228258    second_pane.add(second_value, BorderLayout.CENTER); 
    229     second_pane.add(second_case, BorderLayout.EAST); 
     259    second_pane.add(second_case, BorderLayout.LINE_END); 
    230260 
    231261    order_pane.setBorder(BorderFactory.createEmptyBorder(5,0,0,0)); 
  • gli/trunk/src/org/greenstone/gatherer/gui/metaaudit/MetaAuditFrame.java

    r13531 r18370  
    102102    { 
    103103    super(Gatherer.g_man); 
    104  
     104         
    105105    // Arguments 
    106106    this.autofilter_dialog = new AutofilterDialog(this); 
    107107    this.self = this; 
    108108    this.table = new MetaAuditTable(this); 
    109  
     109        this.setComponentOrientation(Dictionary.getOrientation()); 
    110110    // Creation 
    111111    setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE); 
     
    115115     
    116116    JPanel content_pane = (JPanel) getContentPane(); 
     117        content_pane.setComponentOrientation(Dictionary.getOrientation()); 
    117118    JPanel button_pane = new JPanel(); 
    118  
     119        button_pane.setComponentOrientation(Dictionary.getOrientation()); 
     120         
    119121    JButton close_button = new GLIButton(Dictionary.get("MetaAudit.Close"), Dictionary.get("MetaAudit.Close_Tooltip")); 
    120122     
  • gli/trunk/src/org/greenstone/gatherer/gui/metaaudit/MetaAuditTable.java

    r8783 r18370  
    4343import javax.swing.event.TableModelEvent; 
    4444import javax.swing.table.*; 
     45import org.greenstone.gatherer.Dictionary; 
    4546import org.greenstone.gatherer.collection.CollectionTreeNode; 
    4647import org.greenstone.gatherer.metadata.MetadataAuditTableModel; 
     
    7374    public MetaAuditTable(MetaAuditFrame parent_frame) { 
    7475    super(); 
     76        this.setComponentOrientation(Dictionary.getOrientation()); 
    7577    this.cell_renderer = new MetaAuditRenderer(); 
    7678    this.header_renderer = new HeaderRenderer();