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

    r14568 r18297  
    5757    {
    5858    super(Gatherer.g_man, "Warning", true);
    59 
     59        this.setComponentOrientation(Dictionary.getOrientation());
    6060    // Determine the name of this prompt.
    6161    this.affected_property = affected_property;
     
    7373    // Creation
    7474    JPanel content_pane = (JPanel) getContentPane();
     75        content_pane.setComponentOrientation(Dictionary.getOrientation());
    7576    JPanel text_pane = new JPanel();
     77        text_pane.setComponentOrientation(Dictionary.getOrientation());
    7678    JLabel icon_label = new JLabel(JarTools.getImage("gatherer_medium.gif"));
    77 
     79        icon_label.setComponentOrientation(Dictionary.getOrientation());
     80       
    7881    JTextArea text_area = new JTextArea();
     82        text_area.setComponentOrientation(Dictionary.getOrientation());
    7983    text_area.setEditable(false);
    8084    text_area.setLineWrap(true);
     
    8488
    8589    value_panel = new JPanel();
     90        value_panel.setComponentOrientation(Dictionary.getOrientation());
    8691    JLabel value_label = new JLabel(Dictionary.get("WarningDialog.Value"));
    87    
     92    value_label.setComponentOrientation(Dictionary.getOrientation());
     93       
    8894    value_field = new JTextField();
     95        value_field.setComponentOrientation(Dictionary.getOrientation());
    8996    JPanel bottom_pane = new JPanel();
     97        bottom_pane.setComponentOrientation(Dictionary.getOrientation());
    9098    show_check = new JCheckBox(Dictionary.get("WarningDialog.Dont_Show_Again"));
     99        show_check.setComponentOrientation(Dictionary.getOrientation());
    91100    JPanel control_pane = new JPanel();
     101        control_pane.setComponentOrientation(Dictionary.getOrientation());
    92102    ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip"));
    93103    cancel_button = new GLIButton(Dictionary.get("General.Cancel"), Dictionary.get("General.Pure_Cancel_Tooltip"));
     
    107117    value_panel.setBorder(BorderFactory.createEmptyBorder(5,0,0,0));
    108118    value_panel.setLayout(new BorderLayout(5,0));
    109     value_panel.add(value_label, BorderLayout.WEST);
     119    value_panel.add(value_label, BorderLayout.LINE_START);
    110120    value_panel.add(value_field, BorderLayout.CENTER);
    111121
    112122    text_pane.setLayout(new BorderLayout());
    113     text_pane.add(icon_label, BorderLayout.WEST);
     123    text_pane.add(icon_label, BorderLayout.LINE_START);
    114124    text_pane.add(new JScrollPane(text_area), BorderLayout.CENTER);
    115125    if(affected_property != null) {
     
    124134    else {
    125135        control_pane.setLayout(new BorderLayout());
    126         control_pane.add(ok_button, BorderLayout.EAST);
     136        control_pane.add(ok_button, BorderLayout.LINE_END);
    127137    }
    128138
     
    130140    bottom_pane.setLayout(new BorderLayout());
    131141    bottom_pane.add(show_check, BorderLayout.CENTER);
    132     bottom_pane.add(control_pane, BorderLayout.EAST);
     142    bottom_pane.add(control_pane, BorderLayout.LINE_END);
    133143
    134144    content_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
Note: See TracChangeset for help on using the changeset viewer.