summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-09-08 13:01:04 +0000
committerOliver Bolte <obo@openoffice.org>2004-09-08 13:01:04 +0000
commit17a3b9c305ac2eb303b3b292692ee53d4ad3f1f4 (patch)
tree52b5459dd0c95e6d9d9cbfecf43da0f08aaa5551 /wizards
parenta49dd30c5458a4125ecad3ea48a4052d53356167 (diff)
INTEGRATION: CWS qwizards2 (1.2.2); FILE MERGED
2004/07/19 13:52:35 rpiterman 1.2.2.2: added sort method 2004/06/25 13:49:31 rpiterman 1.2.2.1: added "clear" method
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/common/ConfigSet.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/wizards/com/sun/star/wizards/common/ConfigSet.java b/wizards/com/sun/star/wizards/common/ConfigSet.java
index 1162d18b1de8..d62064cc9e79 100644
--- a/wizards/com/sun/star/wizards/common/ConfigSet.java
+++ b/wizards/com/sun/star/wizards/common/ConfigSet.java
@@ -2,9 +2,9 @@
*
* $RCSfile: ConfigSet.java,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: kz $ $Date: 2004-05-19 12:35:40 $
+ * last change: $Author: obo $ $Date: 2004-09-08 14:01:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -130,6 +130,7 @@ public class ConfigSet implements ConfigNode, XMLProvider, ListModel {
Object[] names = childrenMap.keySet().toArray();
if (ConfigNode.class.isAssignableFrom(childClass)) {
+ //first I remove all the children from the configuration.
String children[] = Configuration.getChildrenNames(configView);
for (int i = 0; i<children.length; i++)
try {
@@ -139,7 +140,7 @@ public class ConfigSet implements ConfigNode, XMLProvider, ListModel {
ex.printStackTrace();
}
-
+ // and add them new.
for (int i = 0; i < names.length; i++) {
try {
ConfigNode child = (ConfigNode) getElement(names[i]);
@@ -202,6 +203,11 @@ public class ConfigSet implements ConfigNode, XMLProvider, ListModel {
remove(o);
}
+ public void clear() {
+ childrenMap.clear();
+ childrenList.clear();
+ }
+
public void update(int i) {
fireListDataListenerContentsChanged(i, i);
}
@@ -382,4 +388,8 @@ public class ConfigSet implements ConfigNode, XMLProvider, ListModel {
}
+ public void sort(Comparator comparator) {
+ Collections.sort(this.childrenList, comparator);
+ }
+
}