Changeset 4522
- Timestamp:
- 2003-06-09T13:15:05+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/MetaEditPane.java
r4519 r4522 149 149 /** The name of the panel containing the metadata table. */ 150 150 static final private String CARD_ONE = "Card One"; 151 /** The name of the panel containing the placeholder for the metadata table. */ 151 /** The name of the panel containing the 'no file' placeholder for the metadata table. */ 152 static final private String CARD_TWO = "Card Two"; 153 /** The name of the panel containing the 'no metadata' placeholder for the metadata table. */ 152 154 static final private String CARD_ZERO = "Card Zero"; 153 155 /** The name of the panel containing the placeholder for the value tree. */ … … 459 461 JPanel table_pane_zero = new JPanel(); 460 462 table_pane_zero.setOpaque(false); 463 464 JPanel table_pane_two = new JPanel(); 465 table_pane_two.setOpaque(false); 461 466 462 467 JLabel no_file_message = new JLabel(get("No_File")); … … 464 469 no_file_message.setOpaque(false); 465 470 no_file_message.setVerticalAlignment(JLabel.CENTER); 471 472 JLabel no_metadata_message = new JLabel(get("No_Metadata")); 473 no_metadata_message.setHorizontalAlignment(JLabel.CENTER); 474 no_metadata_message.setOpaque(false); 475 no_metadata_message.setVerticalAlignment(JLabel.CENTER); 466 476 467 477 JPanel table_pane_one = new JPanel(); … … 564 574 table_pane_one.add(table_scroll, BorderLayout.CENTER); 565 575 576 table_pane_two.setLayout(new BorderLayout()); 577 table_pane_two.add(no_metadata_message, BorderLayout.CENTER); 578 566 579 table_card_pane.setLayout(card_layout); 567 580 table_card_pane.add(table_pane_zero, CARD_ZERO); 568 581 table_card_pane.add(table_pane_one, CARD_ONE); 569 582 table_card_pane.add(table_pane_two, CARD_TWO); 570 583 //view_button_pane.setLayout(new GridLayout(1,2,5,0)); 571 584 //view_button_pane.add(assigned_metadata_view); … … 784 797 public void validateMetadataTable() { 785 798 // Validate card_layout 799 if (records == null) { 800 card_layout.show(table_card_pane, CARD_ZERO); 801 } else if (model.getRowCount() == 0) { 802 card_layout.show(table_card_pane, CARD_TWO); 803 } else { 804 card_layout.show(table_card_pane, CARD_ONE); 805 } 806 /* 786 807 if(records != null && model.getRowCount() > 0) { 787 808 card_layout.show(table_card_pane, CARD_ONE); … … 789 810 else { 790 811 card_layout.show(table_card_pane, CARD_ZERO); 791 }812 }*/ 792 813 } 793 814
Note:
See TracChangeset
for help on using the changeset viewer.