summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorning.zhang2012-04-20 04:29:15 (EDT)
committer dgao2012-04-20 04:29:15 (EDT)
commitb8b3ec22ba11b046bbeda3b363f957fd6645f5e6 (patch)
tree9eb5bdcf4638c86260b491c27841d904fec497a0
parentd49793a732d905913ea7d0ed306d50060ba1b590 (diff)
downloadorg.eclipse.birt-b8b3ec22ba11b046bbeda3b363f957fd6645f5e6.zip
org.eclipse.birt-b8b3ec22ba11b046bbeda3b363f957fd6645f5e6.tar.gz
org.eclipse.birt-b8b3ec22ba11b046bbeda3b363f957fd6645f5e6.tar.bz2
Sort value list and selected value list.
-rw-r--r--UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/ImportValueDialog.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/ImportValueDialog.java b/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/ImportValueDialog.java
index 4d0b4ab..dc49396 100644
--- a/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/ImportValueDialog.java
+++ b/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/ImportValueDialog.java
@@ -14,6 +14,7 @@ package org.eclipse.birt.report.designer.internal.ui.dialogs;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.Date;
import java.util.Iterator;
import java.util.regex.PatternSyntaxException;
@@ -36,6 +37,7 @@ import org.eclipse.birt.report.designer.nls.Messages;
import org.eclipse.birt.report.designer.ui.dialogs.BaseDialog;
import org.eclipse.birt.report.designer.ui.parameters.ParameterUtil;
import org.eclipse.birt.report.designer.ui.views.attributes.providers.ChoiceSetFactory;
+import org.eclipse.birt.report.designer.util.AlphabeticallyComparator;
import org.eclipse.birt.report.designer.util.DEUtil;
import org.eclipse.birt.report.model.api.DataSetHandle;
import org.eclipse.birt.report.model.api.ResultSetColumnHandle;
@@ -611,6 +613,7 @@ public class ImportValueDialog extends BaseDialog
resultList.add( result );
}
}
+ Collections.sort( resultList, new AlphabeticallyComparator( ) );
}
filteValues( );
}
@@ -674,6 +677,10 @@ public class ImportValueDialog extends BaseDialog
{
}
}
+ java.util.List<String> itemList = Arrays.asList(selectedList.getItems());
+ Collections.sort(itemList, new AlphabeticallyComparator());
+ selectedList.setItems((String[]) itemList.toArray());
+
updateButtons( );
}