Ignore:
Timestamp:
2008-12-26T14:35:15+13:00 (15 years ago)
Author:
kjdon
Message:

interface updated to display right to left for rtl languages. This code is thanks to Amin Hejazi. It seems to be only partially complete. Amin was working with Greenstone 3 so might have missed some panels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/branches/rtl-gli/src/org/greenstone/gatherer/gui/GUIManager.java

    r13944 r18297  
    116116    public GUIManager(Dimension size) {
    117117    super();
     118        this.setComponentOrientation(Dictionary.getOrientation());
    118119    // Initialization
    119120    this.help = new HelpFrame();
     
    323324    public void display() {
    324325    content_pane = (JPanel) this.getContentPane();
     326        content_pane.setComponentOrientation(Dictionary.getOrientation());
     327       
    325328    // Enable window-type events to be fired.
    326329    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
     
    348351        // Create the menu-bar and stick it up the top.
    349352        menu_bar = new MenuBar(new MenuListenerImpl());
     353            menu_bar.setComponentOrientation(Dictionary.getOrientation());
    350354
    351355        //feedback changes
     
    357361        // expand to consume all available space like any good gas would.
    358362        tab_pane = new JTabbedPane();
     363            tab_pane.setComponentOrientation(Dictionary.getOrientation());
    359364        tab_pane.addChangeListener(this);
    360365        tab_pane.setFont(Configuration.getFont("general.font", false));
     
    367372        }
    368373
    369         gather_pane = new GatherPane();
     374        gather_pane = new GatherPane();         
    370375        gather_pane.display();
    371376        if (Configuration.get("workflow.gather", true)) {
     
    392397
    393398        create_pane = new CreatePane();
     399            create_pane.setComponentOrientation(Dictionary.getOrientation());
    394400        create_pane.display();
    395401        if (Configuration.get("workflow.create", true)) {
     
    400406
    401407        format_pane = new FormatPane();
     408            format_pane.setComponentOrientation(Dictionary.getOrientation());
    402409        format_pane.display();
    403410        if (Configuration.get("workflow.format", true)) {
     
    408415        // The MetaAuditFrame must be created after the gather/enrich panes but before they get focus
    409416        meta_audit = new MetaAuditFrame();
    410 
     417            meta_audit.setComponentOrientation(Dictionary.getOrientation());
    411418        // Select the collect pane if it is available
    412419        if (tab_pane.indexOfComponent(gather_pane) != -1) {
     
    428435        if (Gatherer.isGsdlRemote) {
    429436        JPanel remote_greenstone_server_progress_panel = new JPanel();
     437               //remote_greenstone_server_progress_panel.setComponentOrientation(Dictionary.getOrientation());
    430438        JLabel remote_greenstone_server_progress_label = new JLabel(Dictionary.get("RemoteGreenstoneServer.Progress"));
     439                //remote_greenstone_server_progress_label.setComponentOrientation(Dictionary.getOrientation());
    431440        remote_greenstone_server_progress_panel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
    432441        remote_greenstone_server_progress_panel.setLayout(new BorderLayout());
    433         remote_greenstone_server_progress_panel.add(remote_greenstone_server_progress_label, BorderLayout.WEST);
     442        remote_greenstone_server_progress_panel.add(remote_greenstone_server_progress_label, BorderLayout.LINE_START);
    434443        remote_greenstone_server_progress_panel.add(RemoteGreenstoneServer.getProgressBar(), BorderLayout.CENTER);
    435444        content_pane.add(remote_greenstone_server_progress_panel, BorderLayout.SOUTH);
     
    694703    {
    695704    OpenCollectionDialog dialog = new OpenCollectionDialog();
     705        dialog.setComponentOrientation(Dictionary.getOrientation());
    696706    if (dialog.display() == OpenCollectionDialog.OK_OPTION) {
    697707        return dialog.getFileName();
Note: See TracChangeset for help on using the changeset viewer.