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

    r12119 r18370  
    7171    super(Gatherer.g_man);
    7272    this.self = this;
    73          
     73        JScrollPane scrol_tmp;
     74        this.setComponentOrientation(Dictionary.getOrientation());
    7475    // Creation
    7576    setModal(true);
     
    7980   
    8081    JPanel content_pane = (JPanel) getContentPane();
     82        content_pane.setComponentOrientation(Dictionary.getOrientation());
    8183    content_pane.setBackground(Configuration.getColor("coloring.collection_heading_background", false));
    8284
    8385    JTextArea instructions_area = new JTextArea(Dictionary.get("PreviewCommandDialog.Instructions"));
    84     instructions_area.setEditable(false);
     86        instructions_area.setComponentOrientation(Dictionary.getOrientation());
     87        instructions_area.setEditable(false);
    8588    instructions_area.setLineWrap(true);
    8689    instructions_area.setRows(5);
     
    8891   
    8992    JPanel button_pane = new JPanel();
     93        button_pane.setComponentOrientation(Dictionary.getOrientation());
    9094    JPanel lower_pane = new JPanel();
     95        lower_pane.setComponentOrientation(Dictionary.getOrientation());
    9196
    9297    JPanel command_pane = new JPanel();
     98        command_pane.setComponentOrientation(Dictionary.getOrientation());
    9399    command_field = new JTextField();
     100        command_field.setComponentOrientation(Dictionary.getOrientation());
    94101    browse_button = new GLIButton(Dictionary.get("FileAssociationDialog.Browse"));
    95102    browse_button.setEnabled(!Utility.isMac());
     
    111118    command_pane.setLayout(new BorderLayout());
    112119    command_pane.add(command_field, BorderLayout.CENTER);
    113     command_pane.add(browse_button, BorderLayout.EAST);
     120    command_pane.add(browse_button, BorderLayout.LINE_END);
    114121
    115122    lower_pane.setBorder(BorderFactory.createEmptyBorder(2,0,0,0));
     
    127134    content_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
    128135    content_pane.setLayout(new BorderLayout());
    129     content_pane.add(new JScrollPane(instructions_area), BorderLayout.NORTH);
     136        scrol_tmp=new JScrollPane(instructions_area);
     137        scrol_tmp.setComponentOrientation(Dictionary.getOrientation());
     138    content_pane.add(scrol_tmp, BorderLayout.NORTH);
    130139    content_pane.add(lower_pane, BorderLayout.CENTER);
    131140
     
    168177    public void actionPerformed(ActionEvent event) {
    169178        JFileChooser chooser = new JFileChooser(new File(Gatherer.getGLIUserDirectoryPath()));
     179            chooser.setComponentOrientation(Dictionary.getOrientation());
    170180        GUIUtils.disableRename(chooser);
    171181        chooser.setDialogTitle(Dictionary.get("FileAssociationDialog.Browse_Title"));
Note: See TracChangeset for help on using the changeset viewer.