aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2008-08-14 08:29:58 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2008-08-14 08:29:58 +0000
commit0b85de0bd83db6b99c5a87991e5755dad440ab75 (patch)
treecbfb42e382eb5dfe7c58d13171aee7088b75f28f /src
parent0645eabb7bfb010de83b69dc120ac8fcf76a450a (diff)
downloadvaadin-framework-0b85de0bd83db6b99c5a87991e5755dad440ab75.tar.gz
vaadin-framework-0b85de0bd83db6b99c5a87991e5755dad440ab75.zip
reverted IndexedContainer specific hack (IdentityHashMap => Set). IndexedContainerProperty now has a reasonable hasCode
svn changeset:5185/svn branch:trunk
Diffstat (limited to 'src')
-rw-r--r--src/com/itmill/toolkit/ui/Table.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/com/itmill/toolkit/ui/Table.java b/src/com/itmill/toolkit/ui/Table.java
index fb11b165c7..bdcca0f5d5 100644
--- a/src/com/itmill/toolkit/ui/Table.java
+++ b/src/com/itmill/toolkit/ui/Table.java
@@ -8,7 +8,6 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.IdentityHashMap;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.LinkedList;
@@ -235,7 +234,7 @@ public class Table extends AbstractSelect implements Action.Container,
* Note: This should be set or list. IdentityHashMap used due very heavy
* hashCode in indexed container
*/
- private Map listenedProperties = null;
+ private HashSet listenedProperties = null;
/**
* Set of visible components - the is used for needsRepaint calculation.
@@ -1168,11 +1167,11 @@ public class Table extends AbstractSelect implements Action.Container,
if (isContentRefreshesEnabled) {
- Map oldListenedProperties = listenedProperties;
+ HashSet oldListenedProperties = listenedProperties;
HashSet oldVisibleComponents = visibleComponents;
// initialize the listener collections
- listenedProperties = new IdentityHashMap();
+ listenedProperties = new HashSet();
visibleComponents = new HashSet();
// Collects the basic facts about the table page
@@ -1275,12 +1274,11 @@ public class Table extends AbstractSelect implements Action.Container,
if (p != null || isGenerated) {
if (p instanceof Property.ValueChangeNotifier) {
if (oldListenedProperties == null
- || !oldListenedProperties
- .containsKey(p)) {
+ || !oldListenedProperties.contains(p)) {
((Property.ValueChangeNotifier) p)
.addListener(this);
}
- listenedProperties.put(p, null);
+ listenedProperties.add(p);
}
if (index < firstIndexNotInCache
&& index >= pageBufferFirstIndex) {
@@ -1351,11 +1349,11 @@ public class Table extends AbstractSelect implements Action.Container,
}
if (oldListenedProperties != null) {
- for (final Iterator i = oldListenedProperties.keySet()
- .iterator(); i.hasNext();) {
+ for (final Iterator i = oldListenedProperties.iterator(); i
+ .hasNext();) {
Property.ValueChangeNotifier o = (ValueChangeNotifier) i
.next();
- if (!listenedProperties.containsKey(o)) {
+ if (!listenedProperties.contains(o)) {
o.removeListener(this);
}
}