()
| 719 | } |
| 720 | |
| 721 | protected void changeMessage() { |
| 722 | SwingUtilities.invokeLater(new Runnable(){ @Override |
| 723 | public void run() { |
| 724 | if (corpus == null || corpus.size() == 0) { |
| 725 | newDocumentAction.setEnabled(true); |
| 726 | messageLabel.setText( |
| 727 | "<html>To add or remove documents to this corpus:<ul>" + |
| 728 | "<li>use the toolbar buttons at the top of this view" + |
| 729 | "<li>drag documents from the left resources tree and drop them below" + |
| 730 | "<li>right click on the corpus in the resources tree and choose 'Populate'" + |
| 731 | "</ul></html>"); |
| 732 | messageLabel.setVisible(true); |
| 733 | } |
| 734 | // This is a really stupid way of checking if all the open documents are in the |
| 735 | //corpus and it seems to be causing more problems than it might possibly be trying |
| 736 | //to solve |
| 737 | /*else if (documentsLoadedCount > 0 |
| 738 | && documentsLoadedCount == corpus.size()) { |
| 739 | newDocumentAction.setEnabled(false); |
| 740 | messageLabel.setText("All the documents loaded in the " + |
| 741 | "system are in this corpus."); |
| 742 | messageLabel.setVisible(true); |
| 743 | } */ |
| 744 | else if (documentsLoadedCount == 0) { |
| 745 | newDocumentAction.setEnabled(false); |
| 746 | if (corpus.getDataStore() == null) { |
| 747 | messageLabel.setText( |
| 748 | "There are no documents loaded in the system. " + |
| 749 | "Press F1 for help."); |
| 750 | } else { |
| 751 | messageLabel.setText("Open a document to load it from the datastore."); |
| 752 | } |
| 753 | messageLabel.setVisible(true); |
| 754 | } else { |
| 755 | newDocumentAction.setEnabled(true); |
| 756 | messageLabel.setVisible(false); |
| 757 | } |
| 758 | }}); |
| 759 | } |
| 760 | |
| 761 | protected XJTable docTable; |
| 762 | protected DocumentTableModel docTableModel; |
no outgoing calls
no test coverage detected