summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-02-07 14:07:28 +0200
committerLeif Åstrand <leif@vaadin.com>2012-02-07 14:07:28 +0200
commit41bffeb84c7f351730a0fee8b3fa69ac488f865b (patch)
tree236fd8f3c81754bf9af37e79816a7ea7a73b9977
parent208f2461a7022b87350d1bfd05da16653df1e430 (diff)
downloadvaadin-framework-41bffeb84c7f351730a0fee8b3fa69ac488f865b.tar.gz
vaadin-framework-41bffeb84c7f351730a0fee8b3fa69ac488f865b.zip
Use one MeasureManager per ApplicationConnection
-rw-r--r--src/com/vaadin/terminal/gwt/client/ApplicationConnection.java4
-rw-r--r--src/com/vaadin/terminal/gwt/client/MeasureManager.java10
2 files changed, 3 insertions, 11 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
index f20243d959..9b112587a0 100644
--- a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
+++ b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
@@ -169,6 +169,8 @@ public class ApplicationConnection {
private Set<VPaintableWidget> zeroHeightComponents = null;
+ private final MeasureManager measureManager = new MeasureManager();
+
public ApplicationConnection() {
view = GWT.create(VViewPaintable.class);
view.setConnection(this);
@@ -2238,7 +2240,7 @@ public class ApplicationConnection {
public void execute() {
layoutScheduled = false;
- MeasureManager.get().doLayout(ApplicationConnection.this);
+ measureManager.doLayout(ApplicationConnection.this);
}
};
diff --git a/src/com/vaadin/terminal/gwt/client/MeasureManager.java b/src/com/vaadin/terminal/gwt/client/MeasureManager.java
index 6fbaa3b3f7..ed0bb20cf8 100644
--- a/src/com/vaadin/terminal/gwt/client/MeasureManager.java
+++ b/src/com/vaadin/terminal/gwt/client/MeasureManager.java
@@ -77,8 +77,6 @@ public class MeasureManager {
}
}
- private static MeasureManager instance = new MeasureManager();
-
public void doLayout(ApplicationConnection client) {
VPaintableMap paintableMap = client.getPaintableMap();
VPaintableWidget[] paintableWidgets = paintableMap
@@ -220,12 +218,4 @@ public class MeasureManager {
return changed;
}
-
- private MeasureManager() {
- // Singleton constructor
- }
-
- public static MeasureManager get() {
- return instance;
- }
}