Changeset 12827


Ignore:
Timestamp:
2006-09-22T09:54:59+12:00 (18 years ago)
Author:
kjdon
Message:

changed the layout slightly - now uses a splitpane, so user can resize the arguments bit at the top

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/CreatePane.java

    r12810 r12827  
    130130    private JPanel sbutton_panel;
    131131    /** A simplified version for lower detail modes containing both the control and progress panes smooshed together. */
    132     private JPanel simple_panel;
     132    private JSplitPane simple_panel;
     133    /** The lower part of the panel which is global so the log pane can be added and removed from it */
     134    private JPanel slower_panel;
    133135    /** The inner panel of the simple pane which is global so that the bar_area can be added and removed from it. */
    134136    private JPanel sinner_panel;
    135     /** The outer panel of the simple pane which is global so that the arguments pane can be added and removed from it. */
    136     private JPanel souter_panel;
    137137    /** The scrolling pane for the log. */
    138138    private JScrollPane log_scroll;
     
    189189
    190190    // And the simple panel
    191     simple_panel = new JPanel();
     191    slower_panel = new JPanel();
    192192    sbutton_panel = new JPanel();
    193193    sinner_panel = new JPanel();
     
    358358    sargument_configuration_scroll = new JScrollPane(sargument_configuration_panel);
    359359    sargument_configuration_scroll.setPreferredSize(ARGUMENT_SIZE);
    360     souter_panel = new JPanel();
    361     souter_panel.setSize(new Dimension(400,800));
    362     souter_panel.setLayout(new GridLayout(2,1));
    363     souter_panel.add(sargument_configuration_scroll);
    364     souter_panel.add(sinner_panel);
    365 
    366     simple_panel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
    367     simple_panel.setLayout(new BorderLayout());
    368     simple_panel.add(souter_panel, BorderLayout.NORTH);
     360   
     361    slower_panel.setLayout(new BorderLayout());
     362    slower_panel.add(sinner_panel, BorderLayout.NORTH);
    369363    if(current_mode < THRESHOLD) {
    370         simple_panel.add(log_scroll, BorderLayout.CENTER);
    371     }
    372 
     364        slower_panel.add(log_scroll, BorderLayout.CENTER);
     365    }
     366   
     367    simple_panel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, sargument_configuration_scroll, slower_panel);
    373368    // Main pane
    374369    main_pane = new JPanel(card_layout);
     
    472467    if(Configuration.getMode() < THRESHOLD) {
    473468        // Update the arguments
    474         souter_panel.remove(sargument_configuration_scroll);
    475         souter_panel.remove(sinner_panel);
     469        simple_panel.remove(sargument_configuration_scroll);
    476470        if(options_pane != null) {
    477471        sargument_configuration_panel = options_pane.buildImport(null);
     
    483477        sargument_configuration_scroll = new JScrollPane(sargument_configuration_panel);
    484478        sargument_configuration_scroll.setPreferredSize(ARGUMENT_SIZE);
    485         souter_panel.add(sargument_configuration_scroll);
    486         souter_panel.add(sinner_panel);
     479        simple_panel.setTopComponent(sargument_configuration_scroll);
    487480        // Remove the shared components from the expert panels
    488481        progress_pane.remove(log_scroll);
    489482        // And add to simple one
    490         simple_panel.add(log_scroll, BorderLayout.CENTER);
     483        slower_panel.add(log_scroll, BorderLayout.CENTER);
    491484        // And bring the card to the front
    492485        card_layout.show(main_pane, SIMPLE);
     
    495488    else {
    496489        // Remove the shared components from the simple panel
    497         simple_panel.remove(log_scroll);
     490        slower_panel.remove(log_scroll);
    498491        // And add then to the expert ones
    499492        progress_pane.add(log_scroll, BorderLayout.CENTER);
     
    595588    // If we are in simple mode, we have to rebuild the simple arguments list
    596589    if(Configuration.getMode() < THRESHOLD) {
    597         souter_panel.remove(sargument_configuration_scroll);
    598         souter_panel.remove(sinner_panel);
     590        simple_panel.remove(sargument_configuration_scroll);
    599591        sargument_configuration_panel = options_pane.buildImport(null);
    600592        sargument_configuration_panel = options_pane.buildBuild(sargument_configuration_panel);
    601593        sargument_configuration_scroll = new JScrollPane(sargument_configuration_panel);
    602594        sargument_configuration_scroll.setPreferredSize(ARGUMENT_SIZE);
    603         souter_panel.add(sargument_configuration_scroll);
    604         souter_panel.add(sinner_panel);
     595        simple_panel.setTopComponent(sargument_configuration_scroll);
    605596    }
    606597    tree.valueChanged(null);
Note: See TracChangeset for help on using the changeset viewer.