Index: Widget.java =================================================================== RCS file: /cvs/graph/lib/src/org/netbeans/api/visual/widget/Widget.java,v retrieving revision 1.64 diff -r1.64 Widget.java 337a338,370 > * Reorders children within the child Widget array. Assists with z-order > * operations on child Widgets. > * > * Child Widgets of parent are reordered in Array per the provided List of > * Integer > * > * @param permutation List consisting of new order. Each array slot > * contains Integer value pointing to the old Objects index > */ > public final void orderChildren(List permutation) { > > assert permutation != null; > > if (parentWidget == null) > return; > List widgets = parentWidget.children; > > assert permutation.size() == widgets.size(); > > List newOrder = new ArrayList(); > for ( int j = 0 ; j < widgets.size(); j++) { > Integer oldIndex = permutation.get(j); > newOrder.add(widgets.get(oldIndex.intValue())); > } > > widgets.clear(); > widgets.addAll(newOrder); > > revalidate (); > parentWidget.revalidate (); > } > > /**