Ignore:
Timestamp:
2009-01-12T14:21:28+13:00 (15 years ago)
Author:
kjdon
Message:

set the ComponentOrientation for a few things, for RTL gli

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/cdm/ArgumentControl.java

    r14783 r18372  
    4141     */
    4242    public ArgumentControl(Argument argument, boolean is_enabled, String preset_value) {
     43      this.setComponentOrientation(Dictionary.getOrientation());
    4344        this.argument = argument;
    4445
     
    6162            //JLabel label = new JLabel(argument.getName());
    6263            JLabel label = new JLabel(dispName);
    63 
     64            label.setComponentOrientation(Dictionary.getOrientation());
    6465            label.setOpaque(false);
    6566            label.setPreferredSize(LABEL_SIZE);
    6667            label.setToolTipText(tip);
    67             add(label, BorderLayout.WEST);
     68            add(label, BorderLayout.LINE_START);
    6869        } else {
    6970            //enabled = new JCheckBox(argument.getName());
    7071            enabled = new JCheckBox(dispName);
    71 
     72            enabled.setComponentOrientation(Dictionary.getOrientation());
    7273            enabled.setOpaque(false);
    7374            enabled.setPreferredSize(LABEL_SIZE);
    7475            enabled.setToolTipText(tip);
    75             add(enabled, BorderLayout.WEST);
     76            add(enabled, BorderLayout.LINE_START);
    7677        }
    7778
     
    9495            ArrayList option_list = argument.getOptions();
    9596            value_control = new GComboBox(option_list.toArray(), false, false);
     97            value_control.setComponentOrientation(Dictionary.getOrientation());
     98           
    9699            selectValue((JComboBox)value_control, initial_value); // also sets the tooltip
    97100            ((JComboBox)value_control).addActionListener(new ToolTipUpdater());
     
    118121
    119122            JSpinner spinner = new JSpinner(new SpinnerNumberModel(initial_int, argument.getMinimum(), argument.getMaximum(), 1));
    120 
     123            spinner.setComponentOrientation(Dictionary.getOrientation());
    121124            // And remember it
    122125            value_control = spinner;
     
    126129        case Argument.STRING:
    127130            value_control = new JTextField(initial_value);
     131            value_control.setComponentOrientation(Dictionary.getOrientation());
    128132            break;
    129133
    130134        case Argument.LANGUAGE:
    131135            value_control = new GComboBox(CollectionDesignManager.language_manager.getLanguageCodes().toArray(), false);
     136            value_control.setComponentOrientation(Dictionary.getOrientation());
    132137            // we want to display the language name not the code
    133138            ((JComboBox)value_control).setRenderer(new LanguageListCellRenderer());
     
    142147        case Argument.METADATA:
    143148            value_control = new GComboBox(MetadataSetManager.getEveryMetadataSetElement(), false);
    144 
     149            value_control.setComponentOrientation(Dictionary.getOrientation());
    145150            // Editable for advanced modes (allows things like dc.Title,ex.Title)
    146151            if (Configuration.getMode() > Configuration.ASSISTANT_MODE) {
     
    176181        case Argument.METADATA_SET_NAMESPACE:
    177182            value_control = new JComboBox();
     183            value_control.setComponentOrientation(Dictionary.getOrientation());
    178184            // !! Hack for exploding metadata databases: add the (empty) exploded metadata set
    179185            File exploded_metadata_set_file = new File(Gatherer.getGLIMetadataDirectoryPath() + "exp" + StaticStrings.METADATA_SET_EXTENSION);
Note: See TracChangeset for help on using the changeset viewer.