diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-02-07 14:07:28 +0200 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-02-07 14:07:28 +0200 |
commit | 41bffeb84c7f351730a0fee8b3fa69ac488f865b (patch) | |
tree | 236fd8f3c81754bf9af37e79816a7ea7a73b9977 | |
parent | 208f2461a7022b87350d1bfd05da16653df1e430 (diff) | |
download | vaadin-framework-41bffeb84c7f351730a0fee8b3fa69ac488f865b.tar.gz vaadin-framework-41bffeb84c7f351730a0fee8b3fa69ac488f865b.zip |
Use one MeasureManager per ApplicationConnection
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ApplicationConnection.java | 4 | ||||
-rw-r--r-- | 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<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; - } } |