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/metaaudit/AutofilterDialog.java

    r13195 r18370  
    108108    this.dialog = dialog;
    109109    this.self = this;
     110        this.setComponentOrientation(Dictionary.getOrientation());
    110111    setModal(true);
    111112    setJMenuBar(new SimpleMenuBar("reviewingmetadata"));
     
    115116    // Creation
    116117    JPanel content_pane = (JPanel) getContentPane();
     118        content_pane.setComponentOrientation(Dictionary.getOrientation());
    117119    JPanel name_pane = new JPanel();
     120        name_pane.setComponentOrientation(Dictionary.getOrientation());
    118121    JLabel name_label = new JLabel(Dictionary.get("Autofilter.Name"));
     122        name_label.setComponentOrientation(Dictionary.getOrientation());
    119123    JTextField name_template = new JTextField();
     124        name_template.setComponentOrientation(Dictionary.getOrientation());
    120125    name = new JLabel();
     126        name.setComponentOrientation(Dictionary.getOrientation());
    121127    name.setBorder(name_template.getBorder());
    122128    control = new JTabbedPane();
     129        control.setComponentOrientation(Dictionary.getOrientation());
    123130    JPanel value_pane = new JPanel();
     131        value_pane.setComponentOrientation(Dictionary.getOrientation());
    124132    JPanel inner_value_pane = new JPanel();
     133        inner_value_pane.setComponentOrientation(Dictionary.getOrientation());
    125134    JLabel value_label = new JLabel(Dictionary.get("Autofilter.eqeq"));
     135        value_label.setComponentOrientation(Dictionary.getOrientation());
    126136    value = new JComboBox();
     137        value.setComponentOrientation(Dictionary.getOrientation());
    127138    value.setOpaque(false);
    128139    value.setEditable(false);
    129140    JPanel custom_pane = new JPanel();
     141        custom_pane.setComponentOrientation(Dictionary.getOrientation());
    130142
    131143    JPanel first_pane = new JPanel();
     144        first_pane.setComponentOrientation(Dictionary.getOrientation());
    132145    first_method = new JComboBox();
     146        first_method.setComponentOrientation(Dictionary.getOrientation());
    133147    first_method.setOpaque(false);
    134148    first_value = new JComboBox();
     149        first_value.setComponentOrientation(Dictionary.getOrientation());
    135150    first_value.setOpaque(false);
    136151    first_value.setEditable(true);
     
    138153    first_value.setSelectedItem("");
    139154    first_case = new JCheckBox(Dictionary.get("Autofilter.Case_Sensitive"));
     155        first_case.setComponentOrientation(Dictionary.getOrientation());
    140156    JPanel operator_pane = new JPanel();
     157        operator_pane.setComponentOrientation(Dictionary.getOrientation());
    141158    JLabel operator_label = new JLabel(Dictionary.get("Autofilter.Operator"));
    142     ButtonGroup operator_group = new ButtonGroup();
     159        operator_label.setComponentOrientation(Dictionary.getOrientation());
     160    ButtonGroup operator_group = new ButtonGroup();       
    143161    and_radiobutton = new JRadioButton(Dictionary.get("Autofilter.AND"));
     162        and_radiobutton.setComponentOrientation(Dictionary.getOrientation());
    144163    and_radiobutton.setOpaque(false);
    145164    none_radiobutton = new JRadioButton(Dictionary.get("Autofilter.None"));
     165        none_radiobutton.setComponentOrientation(Dictionary.getOrientation());
    146166    none_radiobutton.setOpaque(false);
    147167    none_radiobutton.setSelected(true);
    148168    or_radiobutton = new JRadioButton(Dictionary.get("Autofilter.OR"));
     169        or_radiobutton.setComponentOrientation(Dictionary.getOrientation());
    149170    or_radiobutton.setOpaque(false);
    150171    operator_group.add(none_radiobutton);
     
    153174
    154175    JPanel second_pane = new JPanel();
     176        second_pane.setComponentOrientation(Dictionary.getOrientation());
    155177    second_method = new JComboBox();
     178        second_method.setComponentOrientation(Dictionary.getOrientation());
    156179    second_method.setOpaque(false);
    157180    second_method.setEnabled(false);
    158181    second_value = new JComboBox();
     182        second_value.setComponentOrientation(Dictionary.getOrientation());
    159183    second_value.setOpaque(false);
    160184    second_value.setEditable(true);
     
    163187    second_value.setSelectedItem("");
    164188    second_case = new JCheckBox(Dictionary.get("Autofilter.Case_Sensitive"));
     189        second_case.setComponentOrientation(Dictionary.getOrientation());
    165190    JPanel lower_pane = new JPanel();
     191        lower_pane.setComponentOrientation(Dictionary.getOrientation());
    166192    JPanel order_pane = new JPanel();
     193        order_pane.setComponentOrientation(Dictionary.getOrientation());
    167194    order_pane.setToolTipText(Dictionary.get("Autofilter.Order_Tooltip"));
    168195    JLabel order_label = new JLabel(Dictionary.get("Autofilter.Order"));
    169    
     196    order_label.setComponentOrientation(Dictionary.getOrientation());
    170197    ButtonGroup order_group = new ButtonGroup();
    171198    ascending_radiobutton = new JRadioButton(Dictionary.get("Autofilter.Ascending"));
     199        ascending_radiobutton.setComponentOrientation(Dictionary.getOrientation());
    172200    ascending_radiobutton.setOpaque(false);
    173201    ascending_radiobutton.setSelected(true);
    174202    descending_radiobutton = new JRadioButton(Dictionary.get("Autofilter.Descending"));
     203        descending_radiobutton.setComponentOrientation(Dictionary.getOrientation());
    175204    descending_radiobutton.setOpaque(false);
    176205    order_group.add(ascending_radiobutton);
     
    183212    }
    184213    JPanel button_pane = new JPanel();
     214        button_pane.setComponentOrientation(Dictionary.getOrientation());
    185215    cancel_button = new GLIButton(Dictionary.get("General.Cancel"), Dictionary.get("General.Pure_Cancel_Tooltip"));
    186216    remove_button = new GLIButton(Dictionary.get("Autofilter.Remove"), Dictionary.get("Autofilter.Remove_Tooltip"));
     
    200230    name_pane.setBorder(BorderFactory.createEmptyBorder(0,0,5,0));
    201231    name_pane.setLayout(new BorderLayout());
    202     name_pane.add(name_label, BorderLayout.WEST);
     232    name_pane.add(name_label, BorderLayout.LINE_START);
    203233    name_pane.add(name, BorderLayout.CENTER);
    204234
     
    206236
    207237    inner_value_pane.setLayout(new BorderLayout());
    208     inner_value_pane.add(value_label, BorderLayout.WEST);
     238    inner_value_pane.add(value_label, BorderLayout.LINE_START);
    209239    inner_value_pane.add(value, BorderLayout.CENTER);
    210240
     
    214244
    215245    first_pane.setLayout(new BorderLayout());
    216     first_pane.add(first_method, BorderLayout.WEST);
     246    first_pane.add(first_method, BorderLayout.LINE_START);
    217247    first_pane.add(first_value, BorderLayout.CENTER);
    218     first_pane.add(first_case, BorderLayout.EAST);
     248    first_pane.add(first_case, BorderLayout.LINE_END);
    219249
    220250    operator_pane.setLayout(new GridLayout(1,4));
     
    225255
    226256    second_pane.setLayout(new BorderLayout());
    227     second_pane.add(second_method, BorderLayout.WEST);
     257    second_pane.add(second_method, BorderLayout.LINE_START);
    228258    second_pane.add(second_value, BorderLayout.CENTER);
    229     second_pane.add(second_case, BorderLayout.EAST);
     259    second_pane.add(second_case, BorderLayout.LINE_END);
    230260
    231261    order_pane.setBorder(BorderFactory.createEmptyBorder(5,0,0,0));
Note: See TracChangeset for help on using the changeset viewer.