Changeset 8411 for trunk/greenstone3-extensions
- Timestamp:
- 2004-10-22T14:47:12+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/greenstone3-extensions/vishnu/src/vishnu/builder/IndexerGUI.java
r8290 r8411 16 16 public static void addComponentsToPane(Container pane) 17 17 { 18 //String[] labels = {"Top directory of Vishnu: ", "Name of Collection: ", "Directory of Collection: ", "Source directory: ", "Indexer (\"mg\" or \"luc\"): ", "Collection Description: "}; 19 String [] labels = {"Collections directory: ", "Collection id (directory name): ", "Collection name: ","Collection description: ", "Indexer (\"mg\" or \"luc\"): "}; 18 String [] labels = {"Collections directory: ", "Collection id (directory name): ", "Collection name: ","Collection description: ", "Indexer (\"mg\" or \"luc\"): ", "Use views (\"yes\" or \"no\"): "}; 20 19 int numPairs = labels.length; 21 20 textFields = new JTextField[numPairs]; … … 56 55 57 56 butPan.add(new Box.Filler(minSize, prefSize, maxSize)); 58 59 // button = new JButton(" Options ");60 // button.setBorder(BorderFactory.createBevelBorder(0));61 // butPan.add(button);62 57 63 58 butPan.add(new Box.Filler(minSize, prefSize, maxSize)); 64 65 // button = new JButton(" Help ");66 // button.setBorder(BorderFactory.createBevelBorder(0));67 // butPan.add(button);68 59 69 60 pane.add(butPan); … … 80 71 { 81 72 // get data 82 //String source = textFields[3].getText();83 //String dir = textFields[2].getText();84 //String name = textFields[1].getText();85 //String home = textFields[0].getText();86 73 String colls_home = textFields[0].getText(); 87 74 String coll_id = textFields[1].getText(); … … 89 76 String coll_desc = textFields[3].getText(); 90 77 String indexer = textFields[4].getText(); 78 String use_views_str = textFields[5].getText(); 91 79 String coll_home = colls_home; 92 80 if (!coll_home.endsWith(File.separator)) { … … 94 82 } 95 83 coll_home += coll_id + File.separator; 96 //String del = ""; 97 //String description = textFields[5].getText(); 98 //String output = "Launching Collection Builder with \n source = " + source + "\n dir = " + dir + "\n name = " + name + "\n home = " + home + "\n indexer = " + indexer + "\n description = " + description; 84 85 if (!indexer.equals("mg") || !indexer.equals("luc")) { 86 indexer = "mg"; 87 } 88 boolean use_views = false; 89 if (use_views_str.equals("yes")) { 90 use_views = true; 91 } 99 92 String output = "Launching Collection Builder with \n collections home = "+colls_home + "\n collection id = "+coll_name+"\n indexer = "+indexer; 93 if (use_views) { 94 output += "\n using views"; 95 } else { 96 output += "\n not using views"; 97 } 100 98 ja.setText(output); 101 99 102 //CollectionBuilder builder = new CollectionBuilder(dir,name,home,indexer); 103 CollectionBuilder builder = new CollectionBuilder(coll_home, coll_id, coll_name, coll_desc, indexer, false); // no views for now - change this 100 CollectionBuilder builder = new CollectionBuilder(coll_home, coll_id, coll_name, coll_desc, indexer, use_views); 104 101 output += "\n Indexing Finished"; 105 102 ja.setText(output); … … 125 122 126 123 public static void main(String[] args) { 127 //javax.swing.SwingUtilities.invokeLater(new Runnable() { 128 // public void run() { 129 createAndShowGUI(); 130 // } 131 //}); 124 createAndShowGUI(); 132 125 } 133 126 }
Note:
See TracChangeset
for help on using the changeset viewer.