Changeset 2252
- Timestamp:
- 2001-04-02T17:52:03+12:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/java-client/org/nzdl/gsdl/SimpleGraphicalClient/SearchPanel.java
r2251 r2252 65 65 JButton searchButton; 66 66 JComboBox collectionList; 67 JPanel queryFormulationPanel, resultsPanel, dataPanel ;67 JPanel queryFormulationPanel, resultsPanel, dataPanel, optionsPanel; 68 68 JPanel collectionListPanel, searchTextFieldPanel, searchButtonPanel; 69 69 JList resultsList; 70 JCheckBox stemCheckBox, caseFoldCheckBox; 70 71 JScrollPane scrollResultsPane; 71 72 JScrollPane scrollDataPane; … … 138 139 searchTextFieldPanel.add(searchTextField); 139 140 141 optionsPanel = new JPanel(); 142 stemCheckBox = new JCheckBox("Stemming", true); 143 stemCheckBox.setToolTipText("Strip endings such as '...ing', '...ed'"); 144 caseFoldCheckBox = new JCheckBox("Match case", false); 145 caseFoldCheckBox.setToolTipText("Only match when the case is the same"); 146 optionsPanel.add(stemCheckBox); 147 optionsPanel.add(caseFoldCheckBox); 148 140 149 searchButtonPanel = new JPanel(); 141 150 searchButtonPanel.setLayout(new FlowLayout(FlowLayout.RIGHT)); 151 searchButtonPanel.add(optionsPanel); 142 152 searchButtonPanel.add(searchButton); 143 153 … … 209 219 //send query to collection 210 220 NzdlQuery nzdlQuery = new NzdlQuery(queryString); 221 222 // set options 223 nzdlQuery.setStemming((new Boolean(stemCheckBox.isSelected())).toString()); 224 String folding = "false"; 225 if (caseFoldCheckBox.isSelected()) 226 folding = "true"; 227 // interface reverses underlying logic so negate UI element state 228 nzdlQuery.setCaseFolding(! caseFoldCheckBox.isSelected()); 229 211 230 // return the first numResults that match 212 231 nzdlQuery.setEndResults( -1 ); 213 232 // "-1" means consider all the documents that match 214 233 nzdlQuery.setMaxDocs( -1 ); 234 235 215 236 NzdlRequest request = new NzdlRequest( nzdlQuery ); 216 237 NzdlResponse response = new NzdlResponse();
Note:
See TracChangeset
for help on using the changeset viewer.