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

    r12345 r18370  
    6565    {
    6666    super();
    67 
     67        this.setComponentOrientation(Dictionary.getOrientation());
    6868    metadata_value_table = new MetadataValueTable();
    6969
     
    7171    metadata_value_table_scroll.getViewport().setBackground(Configuration.getColor("coloring.collection_tree_background", false));
    7272    metadata_value_table_scroll.setOpaque(true);
    73 
     73        metadata_value_table_scroll.setComponentOrientation(Dictionary.getOrientation());
     74       
    7475    JPanel metadata_value_table_pane = new JPanel();
    7576    metadata_value_table_pane.setLayout(new BorderLayout());
    7677    metadata_value_table_pane.add(metadata_value_table_scroll, BorderLayout.CENTER);
    77 
     78        metadata_value_table_pane.setComponentOrientation(Dictionary.getOrientation());
     79       
    7880    JLabel no_metadata_available_label = new JLabel(Dictionary.get("EnrichPane.No_Metadata"));
    7981    no_metadata_available_label.setHorizontalAlignment(JLabel.CENTER);
    8082    no_metadata_available_label.setOpaque(false);
    8183    no_metadata_available_label.setVerticalAlignment(JLabel.CENTER);
    82    
     84    no_metadata_available_label.setComponentOrientation(Dictionary.getOrientation());
     85       
    8386    JPanel no_metadata_available_pane = new JPanel();
    8487    no_metadata_available_pane.setLayout(new BorderLayout());
    8588    no_metadata_available_pane.add(no_metadata_available_label, BorderLayout.CENTER);
    86 
     89        no_metadata_available_pane.setComponentOrientation(Dictionary.getOrientation());
     90       
    8791    JLabel no_files_selected_label = new JLabel(Dictionary.get("EnrichPane.No_File"));
    8892    no_files_selected_label.setHorizontalAlignment(JLabel.CENTER);
    8993    no_files_selected_label.setOpaque(false);
    9094    no_files_selected_label.setVerticalAlignment(JLabel.CENTER);
    91    
     95    no_files_selected_label.setComponentOrientation(Dictionary.getOrientation());
     96       
    9297    JPanel no_files_selected_pane = new JPanel();
    9398    no_files_selected_pane.setLayout(new BorderLayout());
    9499    no_files_selected_pane.add(no_files_selected_label, BorderLayout.CENTER);
    95 
     100        no_files_selected_pane.setComponentOrientation(Dictionary.getOrientation());
     101       
    96102    card_layout = new CardLayout();
    97103
     
    186192    public MetadataValueTable()
    187193    {
     194            this.setComponentOrientation(Dictionary.getOrientation());
    188195        // Create the model for the table
    189196        metadata_value_table_model = new MetadataValueTableModel();
     
    199206        metadata_value_text_field.addMouseListener(new MetadataValueTextFieldMouseListener());
    200207        metadata_value_text_field.setBorder(null);
     208            metadata_value_text_field.setComponentOrientation(Dictionary.getOrientation());
    201209
    202210        // We need to listen for key presses so we can catch Enter presses
     
    208216        // We also have to ensure that the table column header hasn't gone on a severe Jenny Craig binge and has somehow lost 7/8th of its component size
    209217        JTableHeader table_header = getTableHeader();
     218            table_header.setComponentOrientation(Dictionary.getOrientation());
     219           
    210220        Dimension table_header_preferred_size = table_header.getPreferredSize();
    211221        if (table_header_preferred_size.height < MINIMUM_TABLE_HEADER_SIZE) {
     
    319329        {
    320330        JComponent component = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
    321 
     331                component.setComponentOrientation(Dictionary.getOrientation());
     332               
    322333        int real_column = table.convertColumnIndexToModel(column);
    323334        // First column: inherited metadata icon
Note: See TracChangeset for help on using the changeset viewer.