Revision 43406 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/java/org/gvsig/geodb/vectorialdb/wizard/WizardDB.java
WizardDB.java | ||
---|---|---|
28 | 28 |
import java.awt.event.ActionEvent; |
29 | 29 |
import java.awt.event.ActionListener; |
30 | 30 |
import java.util.ArrayList; |
31 |
import java.util.Comparator; |
|
31 | 32 |
import java.util.Iterator; |
32 | 33 |
import java.util.List; |
33 | 34 |
import java.util.Map; |
... | ... | |
440 | 441 |
* @return |
441 | 442 |
* @throws DataException |
442 | 443 |
*/ |
443 |
protected List getTableList(DBServerExplorer explorer) throws DataException { |
|
444 |
return explorer.list(); |
|
444 |
protected List<DBStoreParameters> getTableList(DBServerExplorer explorer) throws DataException { |
|
445 |
List<DBStoreParameters> l = new ArrayList<>(); |
|
446 |
l.addAll(explorer.list()); |
|
447 |
l.sort(new Comparator<DBStoreParameters>() { |
|
448 |
@Override |
|
449 |
public int compare(DBStoreParameters o1, DBStoreParameters o2) { |
|
450 |
try { |
|
451 |
return o1.getTable().compareToIgnoreCase(o2.getTable()); |
|
452 |
} catch(Exception ex) { |
|
453 |
return 0; |
|
454 |
} |
|
455 |
} |
|
456 |
}); |
|
457 |
return l; |
|
445 | 458 |
} |
446 | 459 |
|
447 | 460 |
@SuppressWarnings("rawtypes") |
Also available in: Unified diff