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/DeleteCollectionPrompt.java

    r14045 r18297  
    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);
Note: See TracChangeset for help on using the changeset viewer.