Ignore:
Timestamp:
2008-12-26T14:35:15+13:00 (15 years ago)
Author:
kjdon
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/branches/rtl-gli/src/org/greenstone/gatherer/gui/OptionsPane.java

    r14240 r18297  
    9898    this.current_controls = new ArrayList();
    9999    this.writing_documents = new Vector();
    100 
     100        this.setComponentOrientation(Dictionary.getOrientation());
     101       
    101102    // Have to do this here, not in display, as the message log view may not have been displayed yet.
    102103    log_textarea = new JTextArea();
     104        log_textarea.setComponentOrientation(Dictionary.getOrientation());
    103105    log_textarea.setEditable(false);
    104106    }
     
    148150      if(pane == null || current_mode >= Configuration.EXPERT_MODE) {
    149151        pane = new JPanel();
     152        pane.setComponentOrientation(Dictionary.getOrientation());
    150153        pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
    151154        pane.setBackground(Configuration.getColor("coloring.collection_tree_background", false));
     
    211214    if(pane == null || current_mode >= Configuration.EXPERT_MODE) {
    212215        pane = new JPanel();
     216            pane.setComponentOrientation(Dictionary.getOrientation());
    213217        pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
    214218        pane.setBackground(Configuration.getColor("coloring.collection_tree_background", false));
     
    244248    if (log_pane == null) {
    245249        log_pane = new JPanel(new BorderLayout());
    246 
     250            log_pane.setComponentOrientation(Dictionary.getOrientation());
    247251        // Build a list of the log files available, ordering by last modified. Log files are like build_log.date.txt
    248252        DefaultListModel contents = new DefaultListModel();
     
    273277
    274278        log_list = new JList(contents);
     279            log_list.setComponentOrientation(Dictionary.getOrientation());
    275280        log_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    276281        log_list.setLayoutOrientation(JList.VERTICAL);
     
    280285
    281286        JLabel log_history_label = new JLabel(Dictionary.get("OptionsPane.LogHistory"));
    282         JPanel log_history_pane = new JPanel();
     287        log_history_label.setComponentOrientation(Dictionary.getOrientation());
     288            JPanel log_history_pane = new JPanel();
     289            log_history_pane.setComponentOrientation(Dictionary.getOrientation());
    283290        log_history_pane.setPreferredSize(new Dimension(600, 100));
    284291        log_history_pane.setLayout(new BorderLayout());
    285292        log_history_pane.add(log_history_label, BorderLayout.NORTH);
    286         log_history_pane.add(new JScrollPane(log_list), BorderLayout.CENTER);
     293            JScrollPane scrol_tmp=new JScrollPane(log_list);
     294            scrol_tmp.setComponentOrientation(Dictionary.getOrientation());
     295        log_history_pane.add(scrol_tmp, BorderLayout.CENTER);
    287296       
    288         log_pane.add(new JScrollPane(log_textarea), BorderLayout.CENTER);
     297            scrol_tmp=new JScrollPane(log_textarea);
     298            scrol_tmp.setComponentOrientation(Dictionary.getOrientation());
     299        log_pane.add(scrol_tmp, BorderLayout.CENTER);
    289300        log_pane.add(log_history_pane, BorderLayout.SOUTH);
    290301    }
Note: See TracChangeset for help on using the changeset viewer.