Changeset 12827
- Timestamp:
- 2006-09-22T09:54:59+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/CreatePane.java
r12810 r12827 130 130 private JPanel sbutton_panel; 131 131 /** 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; 133 135 /** The inner panel of the simple pane which is global so that the bar_area can be added and removed from it. */ 134 136 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;137 137 /** The scrolling pane for the log. */ 138 138 private JScrollPane log_scroll; … … 189 189 190 190 // And the simple panel 191 s imple_panel = new JPanel();191 slower_panel = new JPanel(); 192 192 sbutton_panel = new JPanel(); 193 193 sinner_panel = new JPanel(); … … 358 358 sargument_configuration_scroll = new JScrollPane(sargument_configuration_panel); 359 359 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); 369 363 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); 373 368 // Main pane 374 369 main_pane = new JPanel(card_layout); … … 472 467 if(Configuration.getMode() < THRESHOLD) { 473 468 // Update the arguments 474 souter_panel.remove(sargument_configuration_scroll); 475 souter_panel.remove(sinner_panel); 469 simple_panel.remove(sargument_configuration_scroll); 476 470 if(options_pane != null) { 477 471 sargument_configuration_panel = options_pane.buildImport(null); … … 483 477 sargument_configuration_scroll = new JScrollPane(sargument_configuration_panel); 484 478 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); 487 480 // Remove the shared components from the expert panels 488 481 progress_pane.remove(log_scroll); 489 482 // And add to simple one 490 s imple_panel.add(log_scroll, BorderLayout.CENTER);483 slower_panel.add(log_scroll, BorderLayout.CENTER); 491 484 // And bring the card to the front 492 485 card_layout.show(main_pane, SIMPLE); … … 495 488 else { 496 489 // Remove the shared components from the simple panel 497 s imple_panel.remove(log_scroll);490 slower_panel.remove(log_scroll); 498 491 // And add then to the expert ones 499 492 progress_pane.add(log_scroll, BorderLayout.CENTER); … … 595 588 // If we are in simple mode, we have to rebuild the simple arguments list 596 589 if(Configuration.getMode() < THRESHOLD) { 597 souter_panel.remove(sargument_configuration_scroll); 598 souter_panel.remove(sinner_panel); 590 simple_panel.remove(sargument_configuration_scroll); 599 591 sargument_configuration_panel = options_pane.buildImport(null); 600 592 sargument_configuration_panel = options_pane.buildBuild(sargument_configuration_panel); 601 593 sargument_configuration_scroll = new JScrollPane(sargument_configuration_panel); 602 594 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); 605 596 } 606 597 tree.valueChanged(null);
Note:
See TracChangeset
for help on using the changeset viewer.