17a18
> import java.util.List;
45c46
< 	protected Vector fFigures;
---
> 	protected List fFigures;
57c58
< 		fFigures = new Vector();
---
> 		fFigures = CollectionsFactory.current().createList();
72c73
< 			fFigures.addElement(figure);
---
> 			fFigures.add(figure);
80c81
< 	 * Adds a vector of figures.
---
> 	 * Adds a list of figures.
85c86
< 	public void addAll(Vector newFigures) {
---
> 	public void addAll(List newFigures) {
96c97
< 		while (fe.hasMoreElements()) {
---
> 		while (fe.hasNextFigure()) {
113c114
< 	 * Removes a vector of figures.
---
> 	 * Removes a list of figures.
118c119
< 	public void removeAll(Vector figures) {
---
> 	public void removeAll(List figures) {
128c129
< 		while (fe.hasMoreElements()) {
---
> 		while (fe.hasNextFigure()) {
139c140
< 		while (fe.hasMoreElements()) {
---
> 		while (fe.hasNextFigure()) {
143c144
< 		fFigures.removeAllElements();
---
> 		fFigures.clear();
160c161
< 			fFigures.removeElement(figure);
---
> 			fFigures.remove(figure);
167c168
< 	 * Removes a vector of figures from the figure's list
---
> 	 * Removes a list of figures from the figure's list
173c174
< 	public void orphanAll(Vector newFigures) {
---
> 	public void orphanAll(List newFigures) {
178c179
< 		while (fe.hasMoreElements()) {
---
> 		while (fe.hasNextFigure()) {
197c198
< 			fFigures.setElementAt(replacement, index);
---
> 			fFigures.set(index, replacement);
211,212c212,213
< 			fFigures.removeElement(figure);
< 			fFigures.insertElementAt(figure,0);
---
> 			fFigures.remove(figure);
> 			fFigures.add(0, figure);
226,227c227,228
< 			fFigures.removeElement(figure);
< 			fFigures.addElement(figure);
---
> 			fFigures.remove(figure);
> 			fFigures.add(figure);
268,269c269,270
< 			fFigures.removeElement(figure);
< 			fFigures.insertElementAt(figure, layerNr);
---
> 			fFigures.remove(figure);
> 			fFigures.add(layerNr, figure);
283,284c284,285
< 			Figure currentFigure = (Figure)fFigures.elementAt(i);
< 			Figure predecessorFigure = (Figure)fFigures.elementAt(i - 1);
---
> 			Figure currentFigure = (Figure)fFigures.get(i);
> 			Figure predecessorFigure = (Figure)fFigures.get(i - 1);
295,296c296,297
< 			Figure currentFigure = (Figure)fFigures.elementAt(i);
< 			Figure successorFigure = (Figure)fFigures.elementAt(i + 1);
---
> 			Figure currentFigure = (Figure)fFigures.get(i);
> 			Figure successorFigure = (Figure)fFigures.get(i + 1);
329c330
< 			return (Figure)fFigures.elementAt(layerNr);
---
> 			return (Figure)fFigures.get(layerNr);
341,344c342
< 		FigureEnumeration fe = figures();
< 		while (fe.hasMoreElements()) {
< 			fe.nextFigure().draw(g);
< 		}
---
> 		draw(g, figures());
352c350
< 		while (fe.hasMoreElements()) {
---
> 		while (fe.hasNextFigure()) {
361c359
< 		return (Figure)fFigures.elementAt(i);
---
> 		return (Figure)fFigures.get(i);
372c370
< 		return new FigureEnumerator((Vector)fFigures.clone());
---
> 		return new FigureEnumerator(CollectionsFactory.current().createList(fFigures));
383c381
< 			Vector v =
---
> 			FigureEnumeration fe =
386c384
< 			Vector v2 = new Vector();
---
> 			List l2 = CollectionsFactory.current().createList();
388,389c386,387
< 			for (Enumeration e=v.elements(); e.hasMoreElements(); ) {
< 				Figure f = (Figure) e.nextElement();
---
> 			while (fe.hasNextFigure()) {
> 				Figure f = fe.nextFigure();
391c389
< 				v2.addElement(new OrderedFigureElement(f, f.getZValue()));
---
> 				l2.add(new OrderedFigureElement(f, f.getZValue()));
394c392
< 			Collections.sort(v2);
---
> 			Collections.sort(l2);
396c394
< 			Vector v3 = new Vector();
---
> 			List l3 = CollectionsFactory.current().createList();
398,401c396,398
< 			for (Enumeration e=v2.elements(); e.hasMoreElements(); ) {
< 				OrderedFigureElement ofe = (OrderedFigureElement)
< 				e.nextElement();
< 				v3.addElement(ofe.getFigure());
---
> 			for (Iterator iter = l2.iterator(); iter.hasNext(); ) {
> 				OrderedFigureElement ofe = (OrderedFigureElement)iter.next();
> 				l3.add(ofe.getFigure());
404c401
< 			return new FigureEnumerator(v3);
---
> 			return new FigureEnumerator(l3);
429c426
< 		return new ReverseFigureEnumerator((Vector)fFigures.clone());
---
> 		return new ReverseFigureEnumerator(CollectionsFactory.current().createList(fFigures));
437,439c434,436
< 		FigureEnumeration k = figuresReverse();
< 		while (k.hasMoreElements()) {
< 			Figure figure = k.nextFigure();
---
> 		FigureEnumeration fe = figuresReverse();
> 		while (fe.hasNextFigure()) {
> 			Figure figure = fe.nextFigure();
451,453c448,450
< 		FigureEnumeration k = figuresReverse();
< 		while (k.hasMoreElements()) {
< 			Figure figure = k.nextFigure();
---
> 		FigureEnumeration fe = figuresReverse();
> 		while (fe.hasNextFigure()) {
> 			Figure figure = fe.nextFigure();
474,476c471,473
< 		FigureEnumeration k = figuresReverse();
< 		while (k.hasMoreElements()) {
< 			Figure figure = k.nextFigure();
---
> 		FigureEnumeration fe = figuresReverse();
> 		while (fe.hasNextFigure()) {
> 			Figure figure = fe.nextFigure();
493,495c490,492
< 		FigureEnumeration k = figuresReverse();
< 		while (k.hasMoreElements()) {
< 			Figure figure = k.nextFigure();
---
> 		FigureEnumeration fe = figuresReverse();
> 		while (fe.hasNextFigure()) {
> 			Figure figure = fe.nextFigure();
511,513c508,510
< 		FigureEnumeration k = figuresReverse();
< 		while (k.hasMoreElements()) {
< 			Figure figure = k.nextFigure().findFigureInside(x, y);
---
> 		FigureEnumeration fe = figuresReverse();
> 		while (fe.hasNextFigure()) {
> 			Figure figure = fe.nextFigure().findFigureInside(x, y);
528,530c525,527
< 		FigureEnumeration k = figuresReverse();
< 		while (k.hasMoreElements()) {
< 			Figure figure = k.nextFigure();
---
> 		FigureEnumeration fe = figuresReverse();
> 		while (fe.hasNextFigure()) {
> 			Figure figure = fe.nextFigure();
552c549
< 		while (fe.hasMoreElements()) {
---
> 		while (fe.hasNextFigure()) {
569c566
< 		while (fe.hasMoreElements()) {
---
> 		while (fe.hasNextFigure()) {
580c577
< 		while (fe.hasMoreElements()) {
---
> 		while (fe.hasNextFigure()) {
631c628
< 		while (fe.hasMoreElements()) {
---
> 		while (fe.hasNextFigure()) {
642c639
< 		fFigures = new Vector(size);
---
> 		fFigures = CollectionsFactory.current().createList(size);
654c651
< 		while (fe.hasMoreElements()) {
---
> 		while (fe.hasNextFigure()) {
675c672
< 		while (fe.hasMoreElements()) {
---
> 		while (fe.hasNextFigure()) {
682c679,690
< 			_theQuadTree.add(f, new Bounds(f.displayBox()).asRectangle2D());
---
> 			// Bugfix: Make sure the rectangle is not zero width or height.
> 			// Otherwise, the quadTree search in this.figures(Rectangle)
> 			// will be incorrect. [John Yu, 2002/05/23]
> 			Rectangle r = f.displayBox();
> 			if (r.height == 0) {
> 				r.grow(0, 1);
> 			}
> 			if (r.width == 0) {
> 				r.grow(1, 0);
> 			}
> 
> 			_theQuadTree.add(f, new Bounds(r).asRectangle2D());
