From 41bffeb84c7f351730a0fee8b3fa69ac488f865b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Tue, 7 Feb 2012 14:07:28 +0200 Subject: [PATCH] Use one MeasureManager per ApplicationConnection --- .../terminal/gwt/client/ApplicationConnection.java | 4 +++- src/com/vaadin/terminal/gwt/client/MeasureManager.java | 10 ---------- 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 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; - } } -- 2.39.5