]> source.dussan.org Git - vaadin-framework.git/commitdiff
Use one MeasureManager per ApplicationConnection
authorLeif Åstrand <leif@vaadin.com>
Tue, 7 Feb 2012 12:07:28 +0000 (14:07 +0200)
committerLeif Åstrand <leif@vaadin.com>
Tue, 7 Feb 2012 12:07:28 +0000 (14:07 +0200)
src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
src/com/vaadin/terminal/gwt/client/MeasureManager.java

index f20243d9591ab4ef3d38e2aa49aad14794fb7ac8..9b112587a0ff1f334c916e5840326746507cc912 100644 (file)
@@ -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);
         }
     };
 
index 6fbaa3b3f715afcbdb1f74907b7e8ffa62cc3363..ed0bb20cf8eaeafd0d063fb00b498619e95891c6 100644 (file)
@@ -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;
-    }
 }