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

    r12119 r18370  
    6666    public LockFileDialog(JFrame parent, String name, File lock_file) {
    6767    super(parent, Dictionary.get("LockFileDialog.Title"), true);
     68        this.setComponentOrientation(Dictionary.getOrientation());
    6869    setSize(SIZE);
    6970    setJMenuBar(new SimpleMenuBar("openingacollection"));
     
    7576    // Creation
    7677    JPanel content_pane = (JPanel) getContentPane();
     78        content_pane.setComponentOrientation(Dictionary.getOrientation());
    7779    JPanel upper_pane = new JPanel();
     80        upper_pane.setComponentOrientation(Dictionary.getOrientation());
    7881    ImageIcon icon = JarTools.getImage("lcolicn.gif");
    7982    ImageIcon scaled_icon = new ImageIcon(icon.getImage().getScaledInstance(ICON_SIZE, ICON_SIZE, Image.SCALE_DEFAULT));
    8083    JLabel icon_label = new JLabel(scaled_icon);
     84        icon_label.setComponentOrientation(Dictionary.getOrientation());
    8185    JPanel title_pane = new JPanel();
     86        title_pane.setComponentOrientation(Dictionary.getOrientation());
    8287    JLabel title_one_label = new JLabel(Dictionary.get("General.Warning"));
    83    
     88    title_one_label.setComponentOrientation(Dictionary.getOrientation());
    8489    JTextArea title_two_textarea = new JTextArea(Dictionary.get("LockFileDialog.Lockfile_Message_One"));
     90        title_two_textarea.setComponentOrientation(Dictionary.getOrientation());
    8591    title_two_textarea.setEditable(false);
    8692    title_two_textarea.setLineWrap(true);
     
    8995    title_two_textarea.setWrapStyleWord(true);
    9096   
    91     JPanel central_pane = new JPanel();
    92 
     97        JPanel central_pane = new JPanel();
     98        central_pane.setComponentOrientation(Dictionary.getOrientation());
     99       
    93100    JPanel name_pane = new JPanel();
     101        name_pane.setComponentOrientation(Dictionary.getOrientation());
    94102    JLabel name_label = new JLabel(Dictionary.get("LockFileDialog.Name"));
     103        name_label.setComponentOrientation(Dictionary.getOrientation());
    95104    name_label.setPreferredSize(LABEL_SIZE);
    96105   
    97106    JTextField name_field = new JTextField(name);
     107        name_field.setComponentOrientation(Dictionary.getOrientation());
    98108    name_field.setEditable(false);
    99109    name_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false));
    100110
    101     JPanel person_pane = new JPanel();
    102     JLabel person_label = new JLabel(Dictionary.get("LockFileDialog.User"));
     111
     112        JPanel person_pane = new JPanel();
     113    person_pane.setComponentOrientation(Dictionary.getOrientation());
     114        JLabel person_label = new JLabel(Dictionary.get("LockFileDialog.User"));
     115        person_label.setComponentOrientation(Dictionary.getOrientation());
    103116    person_label.setPreferredSize(LABEL_SIZE);
    104117   
    105118    JTextField person_field = new JTextField(getValue("User"));
     119        person_field.setComponentOrientation(Dictionary.getOrientation());
    106120    person_field.setEditable(false);
    107121    person_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false));
    108122
    109123    JPanel machine_pane = new JPanel();
     124        machine_pane.setComponentOrientation(Dictionary.getOrientation());
    110125    JLabel machine_label = new JLabel(Dictionary.get("LockFileDialog.Machine"));
     126        machine_label.setComponentOrientation(Dictionary.getOrientation());
    111127    machine_label.setPreferredSize(LABEL_SIZE);
    112128   
    113129    JTextField machine_field = new JTextField(getValue("Machine"));
     130        machine_field.setComponentOrientation(Dictionary.getOrientation());
    114131    machine_field.setEditable(false);
    115132    machine_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false));
    116133
    117134    JPanel created_pane = new JPanel();
     135        created_pane.setComponentOrientation(Dictionary.getOrientation());
    118136    JLabel created_label = new JLabel(Dictionary.get("LockFileDialog.Date"));
    119137    created_label.setPreferredSize(LABEL_SIZE);
     138        created_label.setComponentOrientation(Dictionary.getOrientation());
    120139   
    121140    JTextField created_field = new JTextField(getValue("Date"));
     141        created_field.setComponentOrientation(Dictionary.getOrientation());
    122142    created_field.setEditable(false);
    123143    created_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false));
    124144
    125145    JLabel central_label = new JLabel(Dictionary.get("LockFileDialog.Lockfile_Message_Two"));
    126    
     146    central_label.setComponentOrientation(Dictionary.getOrientation());
     147       
    127148    JPanel button_pane = new JPanel();
     149        button_pane.setComponentOrientation(Dictionary.getOrientation());
    128150    ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("LockFileDialog.OK_Tooltip"));
    129151   
     
    142164
    143165    upper_pane.setLayout(new BorderLayout());
    144     upper_pane.add(icon_label, BorderLayout.WEST);
     166    upper_pane.add(icon_label, BorderLayout.LINE_START);
    145167    upper_pane.add(title_pane, BorderLayout.CENTER);
    146168
    147169    name_pane.setLayout(new BorderLayout());
    148     name_pane.add(name_label, BorderLayout.WEST);
     170    name_pane.add(name_label, BorderLayout.LINE_START);
    149171    name_pane.add(name_field, BorderLayout.CENTER);
    150172
    151173    person_pane.setLayout(new BorderLayout());
    152     person_pane.add(person_label, BorderLayout.WEST);
     174    person_pane.add(person_label, BorderLayout.LINE_START);
    153175    person_pane.add(person_field, BorderLayout.CENTER);
    154176
    155177    machine_pane.setLayout(new BorderLayout());
    156     machine_pane.add(machine_label, BorderLayout.WEST);
     178    machine_pane.add(machine_label, BorderLayout.LINE_START);
    157179    machine_pane.add(machine_field, BorderLayout.CENTER);
    158180
    159181    created_pane.setLayout(new BorderLayout());
    160     created_pane.add(created_label, BorderLayout.WEST);
     182    created_pane.add(created_label, BorderLayout.LINE_START);
    161183    created_pane.add(created_field, BorderLayout.CENTER);
    162184
Note: See TracChangeset for help on using the changeset viewer.