From 9d0d07d829e691bfb4f74f4451676e6ed0618cb6 Mon Sep 17 00:00:00 2001 From: megacz Date: Fri, 30 Jan 2004 06:50:11 +0000 Subject: [PATCH] 2002/08/18 05:28:23 darcs-hash:20040130065011-2ba56-eadde0f2dbb9db558c3f6cbdfe22de95be3cbcd8.gz --- CHANGES | 2 ++ src/org/xwt/Trap.java | 35 +++++++++++++++++++---------------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/CHANGES b/CHANGES index 5951acb..b507a49 100644 --- a/CHANGES +++ b/CHANGES @@ -378,4 +378,6 @@ 17-Aug megacz Vec.java: fixed infinite loop +17-Aug megacz Trap.java: switched allTraps from a Vector to a Hashtable + diff --git a/src/org/xwt/Trap.java b/src/org/xwt/Trap.java index d2b3954..94624ae 100644 --- a/src/org/xwt/Trap.java +++ b/src/org/xwt/Trap.java @@ -16,7 +16,7 @@ public class Trap { // Static Data ////////////////////////////////////////////////////////////// /** a vector of weak references to all instances of Trap; used for retheming */ - private static Vec allTraps = new Vec(1000); + private static Hashtable allTraps = new Hashtable(1000); /** List of properties that cannot be trapped */ private static final Hash PROHIBITED = new Hash(120, 3); @@ -32,6 +32,9 @@ public class Trap { for(int i=0; ib. Used for retheming */ public static void removeAllTrapsByBox(Box b) { - for(int i=0; i