summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-02-09 14:50:59 +0200
committerLeif Åstrand <leif@vaadin.com>2012-02-09 14:50:59 +0200
commit503e7760fa0764fcc822d83d202a61e1c93dff6b (patch)
tree94aa8c35d3856fa54d09586814dc5806d80fec46 /src/com/vaadin
parenta062383b16cc1394baa604a0841416d646e91fba (diff)
downloadvaadin-framework-503e7760fa0764fcc822d83d202a61e1c93dff6b.tar.gz
vaadin-framework-503e7760fa0764fcc822d83d202a61e1c93dff6b.zip
Remove paintableToId now that each VPaintable knows its own pid (#8323)
Diffstat (limited to 'src/com/vaadin')
-rw-r--r--src/com/vaadin/terminal/gwt/client/VPaintableMap.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/VPaintableMap.java b/src/com/vaadin/terminal/gwt/client/VPaintableMap.java
index aa3e8e3cb8..a3b6f62174 100644
--- a/src/com/vaadin/terminal/gwt/client/VPaintableMap.java
+++ b/src/com/vaadin/terminal/gwt/client/VPaintableMap.java
@@ -22,7 +22,6 @@ import com.vaadin.terminal.gwt.client.RenderInformation.Size;
public class VPaintableMap {
private Map<String, VPaintable> idToPaintable = new HashMap<String, VPaintable>();
- private Map<VPaintable, String> paintableToId = new HashMap<VPaintable, String>();
public static VPaintableMap get(ApplicationConnection applicationConnection) {
return applicationConnection.getPaintableMap();
@@ -81,7 +80,6 @@ public class VPaintableMap {
*/
public void clear() {
idToPaintable.clear();
- paintableToId.clear();
idToComponentDetail.clear();
}
@@ -99,7 +97,6 @@ public class VPaintableMap {
ComponentDetail componentDetail = GWT.create(ComponentDetail.class);
idToComponentDetail.put(pid, componentDetail);
idToPaintable.put(pid, paintable);
- paintableToId.put(paintable, pid);
if (paintable instanceof VPaintableWidget) {
VPaintableWidget pw = (VPaintableWidget) paintable;
setPid(pw.getWidgetForPaintable().getElement(), pid);
@@ -122,12 +119,14 @@ public class VPaintableMap {
* the paintable who's id is needed
* @return the id for the given paintable or null if the paintable could not
* be found
+ * @deprecated use {@link VPaintable#getId()} instead
*/
+ @Deprecated
public String getPid(VPaintable paintable) {
if (paintable == null) {
return null;
}
- return paintableToId.get(paintable);
+ return paintable.getId();
}
@Deprecated
@@ -235,7 +234,6 @@ public class VPaintableMap {
// clean reference to paintable
idToComponentDetail.remove(pid);
idToPaintable.remove(pid);
- paintableToId.remove(paintable);
}
/*
* else NOP : same component has been reattached to another
@@ -360,7 +358,7 @@ public class VPaintableMap {
}
public Collection<? extends VPaintable> getPaintables() {
- return Collections.unmodifiableCollection(paintableToId.keySet());
+ return Collections.unmodifiableCollection(idToPaintable.values());
}
/**