diff options
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/common/ConfigSet.java | 16 |
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); + } + } |