summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/vaadin')
-rw-r--r--src/com/vaadin/terminal/gwt/client/MeasureManager.java29
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VMeasuringOrderedLayoutPaintable.java6
2 files changed, 2 insertions, 33 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/MeasureManager.java b/src/com/vaadin/terminal/gwt/client/MeasureManager.java
index 9bcecfd786..6fbaa3b3f7 100644
--- a/src/com/vaadin/terminal/gwt/client/MeasureManager.java
+++ b/src/com/vaadin/terminal/gwt/client/MeasureManager.java
@@ -1,14 +1,11 @@
package com.vaadin.terminal.gwt.client;
-import java.util.ArrayList;
-import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import com.google.gwt.core.client.JsArrayString;
import com.google.gwt.dom.client.Element;
-import com.google.gwt.user.client.ui.HasWidgets;
import com.google.gwt.user.client.ui.RequiresResize;
import com.google.gwt.user.client.ui.Widget;
@@ -82,32 +79,6 @@ public class MeasureManager {
private static MeasureManager instance = new MeasureManager();
- public static Collection<VPaintableWidget> getChildren(
- VPaintableWidgetContainer paintable, ApplicationConnection client) {
- Widget widget = paintable.getWidgetForPaintable();
- Collection<VPaintableWidget> children = new ArrayList<VPaintableWidget>();
-
- addDescendantPaintables(widget, children, client);
-
- return children;
- }
-
- private static void addDescendantPaintables(Widget widget,
- Collection<VPaintableWidget> paintables,
- ApplicationConnection client) {
- if (widget instanceof HasWidgets) {
- VPaintableMap paintableMap = client.getPaintableMap();
- for (Widget child : (HasWidgets) widget) {
- VPaintableWidget paintable = paintableMap.getPaintable(child);
- if (paintable != null) {
- paintables.add(paintable);
- } else {
- addDescendantPaintables(child, paintables, client);
- }
- }
- }
- }
-
public void doLayout(ApplicationConnection client) {
VPaintableMap paintableMap = client.getPaintableMap();
VPaintableWidget[] paintableWidgets = paintableMap
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VMeasuringOrderedLayoutPaintable.java b/src/com/vaadin/terminal/gwt/client/ui/VMeasuringOrderedLayoutPaintable.java
index d67574e90f..5e0565f539 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VMeasuringOrderedLayoutPaintable.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VMeasuringOrderedLayoutPaintable.java
@@ -215,8 +215,7 @@ public abstract class VMeasuringOrderedLayoutPaintable extends
}
private void layoutPrimaryDirection() {
- Collection<VPaintableWidget> children = MeasureManager.getChildren(
- this, getWidgetForPaintable().client);
+ Collection<VPaintableWidget> children = getChildren();
// First pass - get total expand ratio and allocated size
int totalAllocated = 0;
@@ -335,8 +334,7 @@ public abstract class VMeasuringOrderedLayoutPaintable extends
}
private void layoutSecondaryDirection() {
- Collection<VPaintableWidget> children = MeasureManager.getChildren(
- this, getWidgetForPaintable().client);
+ Collection<VPaintableWidget> children = getChildren();
int maxSize = 0;
for (VPaintableWidget child : children) {