idok-commit AT lists.psi.ch
Subject: Commit emails of the iDok project
List archive
- From: "Apache" <apache AT savannah.psi.ch>
- To: idok-commit AT lists.psi.ch
- Subject: [idok-commit] idok commit r153 - trunk/java/ch/idok/qtgui
- Date: Tue, 29 Jul 2008 11:35:40 +0200
- List-archive: <https://lists.web.psi.ch/pipermail/idok-commit/>
- List-id: Commit emails of the iDok project <idok-commit.lists.psi.ch>
Author: huebner AT PSI.CH
Date: Tue Jul 29 11:35:39 2008
New Revision: 153
Log:
Added improvement IDO-163: Sort key names in advanced search dialog
Modified:
trunk/java/ch/idok/qtgui/AdvancedSearchController.java
Modified: trunk/java/ch/idok/qtgui/AdvancedSearchController.java
==============================================================================
--- trunk/java/ch/idok/qtgui/AdvancedSearchController.java (original)
+++ trunk/java/ch/idok/qtgui/AdvancedSearchController.java Tue Jul 29
11:35:39 2008
@@ -19,7 +19,9 @@
package ch.idok.qtgui;
+import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
import ch.idok.common.errorhandling.DmsException;
@@ -121,6 +123,7 @@
if (fieldList != null) {
gui_.metaDataComboBox.clear();
+ Arrays.sort(fieldList);
gui_.metaDataComboBox.addItems(Arrays.asList(fieldList));
}
}
@@ -138,14 +141,17 @@
private void fillMetadataListsFromSchema() {
gui_.metaDataComboBox.clear();
+ List<String> records = new ArrayList<String>();
for (int i = 0; i < schemaController_.size(); i++) {
Field record = schemaController_.getRecord(i);
if (record.ntupleHeader != null) {
- gui_.metaDataComboBox.addItems(record.ntupleHeader);
+ records.addAll(record.ntupleHeader);
} else {
- gui_.metaDataComboBox.addItem(record.key);
+ records.add(record.key);
}
}
+ Collections.sort(records);
+ gui_.metaDataComboBox.addItems(records);
fillValueListsFromSchema(gui_.metaDataComboBox.currentText());
}
- [idok-commit] idok commit r153 - trunk/java/ch/idok/qtgui, Apache, 07/29/2008
Archive powered by MHonArc 2.6.19.