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

    r18175 r18370  
    6666    {
    6767    super(Gatherer.g_man, "Warning", true);
    68 
     68        this.setComponentOrientation(Dictionary.getOrientation());
    6969    this.showcheckbox = showcheckbox;
    7070
     
    8484    // Creation
    8585    JPanel content_pane = (JPanel) getContentPane();
     86        content_pane.setComponentOrientation(Dictionary.getOrientation());
    8687    JPanel text_pane = new JPanel();
    87 
     88        text_pane.setComponentOrientation(Dictionary.getOrientation());
     89       
    8890    String gmedium_image = "gatherer_medium.gif";
    8991    if (Configuration.fedora_info.isActive()) {
     
    9294
    9395    JLabel icon_label = new JLabel(JarTools.getImage(gmedium_image));
     96        icon_label.setComponentOrientation(Dictionary.getOrientation());
    9497
    9598    JTextArea text_area = new JTextArea();
     99        text_area.setComponentOrientation(Dictionary.getOrientation());
    96100    text_area.setEditable(false);
    97101    text_area.setLineWrap(true);
     
    101105
    102106    value_panel = new JPanel();
     107        value_panel.setComponentOrientation(Dictionary.getOrientation());
    103108    JLabel value_label = new JLabel(Dictionary.get("WarningDialog.Value"));
    104    
     109    value_label.setComponentOrientation(Dictionary.getOrientation());
     110       
    105111    value_field = new JTextField();
     112        value_field.setComponentOrientation(Dictionary.getOrientation());
    106113    JPanel bottom_pane = new JPanel();
     114        bottom_pane.setComponentOrientation(Dictionary.getOrientation());
     115       
    107116    JPanel control_pane = new JPanel();
     117        control_pane.setComponentOrientation(Dictionary.getOrientation());
    108118    ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip"));
    109119    cancel_button = new GLIButton(Dictionary.get("General.Cancel"), Dictionary.get("General.Pure_Cancel_Tooltip"));
     
    123133    value_panel.setBorder(BorderFactory.createEmptyBorder(5,0,0,0));
    124134    value_panel.setLayout(new BorderLayout(5,0));
    125     value_panel.add(value_label, BorderLayout.WEST);
     135    value_panel.add(value_label, BorderLayout.LINE_START);
    126136    value_panel.add(value_field, BorderLayout.CENTER);
    127137
    128138    text_pane.setLayout(new BorderLayout());
    129     text_pane.add(icon_label, BorderLayout.WEST);
     139    text_pane.add(icon_label, BorderLayout.LINE_START);
    130140    text_pane.add(new JScrollPane(text_area), BorderLayout.CENTER);
    131141    if(affected_property != null) {
     
    140150    else {
    141151        control_pane.setLayout(new BorderLayout());
    142         control_pane.add(ok_button, BorderLayout.EAST);
     152        control_pane.add(ok_button, BorderLayout.LINE_END);
    143153    }
    144154
    145155    bottom_pane.setBorder(BorderFactory.createEmptyBorder(5,0,0,0));
    146156    bottom_pane.setLayout(new BorderLayout());
    147     bottom_pane.add(control_pane, BorderLayout.EAST);
     157    bottom_pane.add(control_pane, BorderLayout.LINE_END);
    148158    if(showcheckbox) {
    149159        show_check = new JCheckBox(Dictionary.get("WarningDialog.Dont_Show_Again"));
     160        show_check.setComponentOrientation(Dictionary.getOrientation());
    150161        bottom_pane.add(show_check, BorderLayout.CENTER);
    151162    }
Note: See TracChangeset for help on using the changeset viewer.