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