Changeset 18372 for gli


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

Location:
gli/trunk/src/org/greenstone/gatherer
Files:
5 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);
  • gli/trunk/src/org/greenstone/gatherer/gui/DownloadPane.java

    r18370 r18372  
    175175            mode_pane.add(tree_pane,JSplitPane.RIGHT);
    176176            mode_pane.add(options_scroll_pane,JSplitPane.LEFT);
    177             mode_pane.setDividerLocation(1);
     177            mode_pane.setDividerLocation(1-TREE_SIZE.width);
    178178        }
    179179       
  • gli/trunk/src/org/greenstone/gatherer/gui/ExportAsPrompt.java

    r18370 r18372  
    171171       
    172172    details_label = new JLabel(Dictionary.get("DeleteCollectionPrompt.Collection_Details"));
    173    
     173    details_label.setComponentOrientation(Dictionary.getOrientation());
    174174
    175175    instructions_textarea = new JTextArea(Dictionary.get("ExportAsPrompt.Instructions"));
     
    249249    //list = new CheckList(true);
    250250    list = new JList(getCollectionListModel());
     251    list.setComponentOrientation(Dictionary.getOrientation());
    251252    list_label = new JLabel(Dictionary.get("DeleteCollectionPrompt.Collection_List"));
    252253    list_label.setComponentOrientation(Dictionary.getOrientation());
  • gli/trunk/src/org/greenstone/gatherer/gui/Preferences.java

    r18370 r18372  
    348348    // Layout
    349349    program_pane.setLayout(new BorderLayout());
    350     program_pane.add(program_label, BorderLayout.LINE_END);
     350    program_pane.add(program_label, BorderLayout.LINE_START);
    351351    program_pane.add(program_field, BorderLayout.CENTER);
    352352
  • gli/trunk/src/org/greenstone/gatherer/util/CheckListEntry.java

    r12047 r18372  
    22
    33import javax.swing.JCheckBox;
     4import org.greenstone.gatherer.Dictionary;
    45
    56/** A CheckListEntry encapsulates a single row of the list, both its check box and the object the row represents. */
     
    1819    super(object.toString());
    1920    this.object = object;
     21    this.setComponentOrientation(Dictionary.getOrientation());
    2022    }
    2123
     
    2325    public CheckListEntry(String text, boolean is_selected) {
    2426    super(text);
     27    this.setComponentOrientation(Dictionary.getOrientation());
    2528    setSelected(is_selected);
    2629    }
Note: See TracChangeset for help on using the changeset viewer.