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

    r12710 r18370  
    8181    this.file_association_manager = file_association_manager;
    8282    this.self = this;
    83          
     83        this.setComponentOrientation(Dictionary.getOrientation());
    8484    // Creation
    8585    setModal(true);
     
    109109    extension_field = new NonWhitespaceField();
    110110    extension_field.setToolTipText(Dictionary.get("FileAssociationDialog.Extension_Tooltip"));
    111 
     111               
    112112    JLabel command_label = new JLabel(Dictionary.get("FileAssociationDialog.Command"));
    113113    JPanel command_pane = new JPanel();
     
    123123
    124124
    125     JPanel button_pane = new JPanel();
    126    
     125    JPanel button_pane = new JPanel();       
     126       
    127127    add_button = new GLIButton(Dictionary.get("FileAssociationDialog.Add"), Dictionary.get("FileAssociationDialog.Add_Tooltip"));
    128128    add_button.setEnabled(false);
     
    151151    extension_pane.setBorder(BorderFactory.createEmptyBorder(2,0,2,0));
    152152    extension_pane.setLayout(new BorderLayout(5,0));
    153     extension_pane.add(extension_label, BorderLayout.WEST);
     153    extension_pane.add(extension_label, BorderLayout.LINE_START);
    154154    extension_pane.add(extension_field, BorderLayout.CENTER);
    155155
     
    157157    command_pane.setLayout(new BorderLayout());
    158158    command_pane.add(command_field, BorderLayout.CENTER);
    159     command_pane.add(browse_button, BorderLayout.EAST);
     159    command_pane.add(browse_button, BorderLayout.LINE_END);
    160160
    161161    details_pane.setBorder(BorderFactory.createTitledBorder(Dictionary.get("FileAssociationDialog.Details")));
     
    181181    control_pane.setBorder(BorderFactory.createEmptyBorder(5,0,0,0));
    182182    control_pane.setLayout(new BorderLayout());
    183     control_pane.add(new JScrollPane(existing_associations_table), BorderLayout.CENTER);
     183        JScrollPane scrol_tmp;
     184        scrol_tmp = new JScrollPane(existing_associations_table);
     185        scrol_tmp.setComponentOrientation(Dictionary.getOrientation());
     186    control_pane.add(scrol_tmp, BorderLayout.CENTER);
    184187    control_pane.add(lower_pane, BorderLayout.SOUTH);
    185188
    186189    content_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
    187190    content_pane.setLayout(new BorderLayout());
    188     content_pane.add(new JScrollPane(instructions_area), BorderLayout.NORTH);
     191        scrol_tmp = new JScrollPane(instructions_area);
     192        scrol_tmp.setComponentOrientation(Dictionary.getOrientation());
     193    content_pane.add(scrol_tmp, BorderLayout.NORTH);
    189194    content_pane.add(control_pane, BorderLayout.CENTER);
    190195
     
    192197    setLocation((int)(screen.getX() + (screen.getWidth() - SIZE.width) / 2), (int)(screen.getY() + (screen.getHeight() - SIZE.height) / 2));
    193198    screen = null;
     199       
     200        //RTL
     201        content_pane.setComponentOrientation(Dictionary.getOrientation());
     202        instructions_area.setComponentOrientation(Dictionary.getOrientation());
     203        control_pane.setComponentOrientation(Dictionary.getOrientation());
     204        existing_associations_table.setComponentOrientation(Dictionary.getOrientation());
     205        lower_pane.setComponentOrientation(Dictionary.getOrientation());
     206        details_pane.setComponentOrientation(Dictionary.getOrientation());
     207        extension_pane.setComponentOrientation(Dictionary.getOrientation());
     208        extension_label.setComponentOrientation(Dictionary.getOrientation());
     209        extension_field.setComponentOrientation(Dictionary.getOrientation());
     210        command_label.setComponentOrientation(Dictionary.getOrientation());
     211        command_pane.setComponentOrientation(Dictionary.getOrientation());
     212        //end
    194213    }
    195214
Note: See TracChangeset for help on using the changeset viewer.