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

    r14721 r18297  
    6666    this.self = this;
    6767    setSize(SIZE);
    68          
     68        this.setComponentOrientation(Dictionary.getOrientation());       
    6969    JPanel content_pane = (JPanel) getContentPane();
     70        content_pane.setComponentOrientation(Dictionary.getOrientation());
     71       
    7072    JPanel upper_pane = new JPanel();
     73        upper_pane.setComponentOrientation(Dictionary.getOrientation());
     74       
    7175    ImageIcon icon = JarTools.getImage("gatherer_medium.gif");
    7276    ImageIcon scaled_icon = new ImageIcon(icon.getImage().getScaledInstance(ICON_SIZE, ICON_SIZE, Image.SCALE_DEFAULT));
    7377    JLabel icon_label = new JLabel(scaled_icon);
    74     JPanel title_pane = new JPanel();
    75     JLabel title_one_label = new JLabel(Dictionary.get("AboutDialog.Title_One"));
    76     JLabel title_two_label = new JLabel(Gatherer.PROGRAM_NAME + " " + Gatherer.PROGRAM_VERSION + " " + Dictionary.get("AboutDialog.Date"));
    77     JLabel title_three_label = new JLabel(Dictionary.get("AboutDialog.Title_Two"));
    78     JLabel copyright_label = new JLabel(Dictionary.get("AboutDialog.Copyright"));
    79     JLabel gpl_label = new JLabel(Dictionary.get("AboutDialog.Copyright_Two"));
    80    
     78    icon_label.setComponentOrientation(Dictionary.getOrientation());
     79       
     80        JPanel title_pane = new JPanel();
     81    title_pane.setComponentOrientation(Dictionary.getOrientation());
     82       
     83        JLabel title_one_label = new JLabel(Dictionary.get("AboutDialog.Title_One"));
     84    title_one_label.setComponentOrientation(Dictionary.getOrientation());
     85        JLabel title_two_label = new JLabel(Gatherer.PROGRAM_NAME + " " + Gatherer.PROGRAM_VERSION + " " + Dictionary.get("AboutDialog.Date"));
     86        title_two_label.setComponentOrientation(Dictionary.getOrientation());
     87        JLabel title_three_label = new JLabel(Dictionary.get("AboutDialog.Title_Two"));
     88    title_three_label.setComponentOrientation(Dictionary.getOrientation());
     89        JLabel copyright_label = new JLabel(Dictionary.get("AboutDialog.Copyright"));
     90    copyright_label.setComponentOrientation(Dictionary.getOrientation());
     91        JLabel gpl_label = new JLabel(Dictionary.get("AboutDialog.Copyright_Two"));
     92        gpl_label.setComponentOrientation(Dictionary.getOrientation());
     93       
    8194    JTextArea text = new JTextArea();
     95        text.setComponentOrientation(Dictionary.getOrientation());
    8296    text.setLineWrap(true);
    8397    text.setWrapStyleWord(true);
    84 
     98       
     99       
    85100    JPanel button_pane = new JPanel();
     101        button_pane.setComponentOrientation(Dictionary.getOrientation());
    86102    close_button = new GLIButton(Dictionary.get("General.Close"), Dictionary.get("General.Close_Tooltip"));
    87103   
     
    101117    upper_pane.setBorder(BorderFactory.createEmptyBorder(0,0,5,0));
    102118    upper_pane.setLayout(new BorderLayout());
    103     upper_pane.add(icon_label, BorderLayout.WEST);
     119    upper_pane.add(icon_label, BorderLayout.LINE_START);
    104120    upper_pane.add(title_pane, BorderLayout.CENTER);
    105121
    106122    button_pane.setBorder(BorderFactory.createEmptyBorder(5,0,0,0));
    107123    button_pane.setLayout(new BorderLayout());
    108     button_pane.add(close_button, BorderLayout.EAST);
     124    button_pane.add(close_button, BorderLayout.LINE_END);
    109125
    110126    content_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
Note: See TracChangeset for help on using the changeset viewer.