Changeset 2274
- Timestamp:
- 2001-04-03T22:01:12+12:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/java-client/org/nzdl/gsdl/SimpleGraphicalClient/SearchPanel.java
r2273 r2274 142 142 searchTextFieldPanel.add(searchTextField); 143 143 144 144 //NzdlPreferences prefs = NzdlPreferences.getInstance(); 145 145 String queryType = NzdlConstants.DEFAULT_QUERY_TYPE; 146 System.err.println("default queryType = " + queryType);147 146 if (NzdlPreferences.getInstance().isString(NzdlConstants.QUERYTYPE)) { 148 147 queryType = NzdlPreferences.getInstance().getString(NzdlConstants.QUERYTYPE); 149 148 } 150 System.err.println("queryType = " + queryType); 149 System.err.println(queryType); 150 // check integrity of queryType 151 if (!((queryType.equals(NzdlConstants.RANKED_STRING)) | (queryType.equals(NzdlConstants.BOOLEAN_STRING)))) 152 // preferences may have been corrupted! 153 queryType = NzdlConstants.DEFAULT_QUERY_TYPE; 151 154 boolean stemming = NzdlConstants.DEFAULT_STEMMING; 152 155 if (NzdlPreferences.getInstance().isBoolean(NzdlConstants.STEMMING)) … … 160 163 queryTypePanel = new JPanel(); 161 164 queryTypePanel.setLayout(new GridLayout(2,1)); 162 rankedRadioButton = new JRadioButton( "ranked");163 rankedRadioButton.setActionCommand( rankedRadioButton.getText());165 rankedRadioButton = new JRadioButton(NzdlConstants.RANKED_STRING); 166 rankedRadioButton.setActionCommand(NzdlConstants.RANKED_STRING); 164 167 rankedRadioButton.setSelected(queryType.equals(rankedRadioButton.getText())); 165 168 rankedRadioButton.setToolTipText("Display results in a ranked list"); 166 169 167 booleanRadioButton = new JRadioButton( "boolean");168 booleanRadioButton.setActionCommand( booleanRadioButton.getText());170 booleanRadioButton = new JRadioButton(NzdlConstants.BOOLEAN_STRING); 171 booleanRadioButton.setActionCommand(NzdlConstants.BOOLEAN_STRING); 169 172 booleanRadioButton.setSelected(queryType.equals(booleanRadioButton.getText())); 170 173 booleanRadioButton.setToolTipText("Allows the use of Boolean operators: AND(&) OR(|) and NOT(!)");
Note:
See TracChangeset
for help on using the changeset viewer.