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

committed code submitted by Amin Hedjazi for making the GLI right to left. I worked on this code on the rtl-gli branch, then merged the branch back to the trunk at revision 18368. The branch code was slightly different in a couple of places where it shouldn't have been. So don't use the branch code next time. Start a new branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/gui/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
Note: See TracChangeset for help on using the changeset viewer.