From 1310db23cab508cc713ed41eacdc17a63c5773da Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Thu, 12 Apr 2012 16:51:01 +0300 Subject: [PATCH] API naming change, needs update -> needs layout --- .../vaadin/terminal/gwt/client/LayoutManager.java | 14 +++++++------- .../gwt/client/ui/AbstractComponentConnector.java | 4 ++-- .../client/ui/gridlayout/GridLayoutConnector.java | 2 +- .../gwt/client/ui/menubar/MenuBarConnector.java | 2 +- .../AbstractOrderedLayoutConnector.java | 4 ++-- .../ui/splitpanel/AbstractSplitPanelConnector.java | 2 +- .../gwt/client/ui/table/TableConnector.java | 2 +- .../ui/twincolselect/TwinColSelectConnector.java | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/com/vaadin/terminal/gwt/client/LayoutManager.java b/src/com/vaadin/terminal/gwt/client/LayoutManager.java index 4338f1284a..d0bd841dad 100644 --- a/src/com/vaadin/terminal/gwt/client/LayoutManager.java +++ b/src/com/vaadin/terminal/gwt/client/LayoutManager.java @@ -69,7 +69,7 @@ public class LayoutManager { public void registerDependency(ManagedLayout owner, Element element) { MeasuredSize measuredSize = ensureMeasured(element); - setNeedsUpdate(owner); + setNeedsLayout(owner); measuredSize.addDependent(owner.getConnectorId()); } @@ -528,7 +528,7 @@ public class LayoutManager { .getComponentConnectors(); for (ComponentConnector connector : paintableWidgets) { if (connector instanceof ManagedLayout) { - setNeedsUpdate((ManagedLayout) connector); + setNeedsLayout((ManagedLayout) connector); } } setEverythingNeedsMeasure(); @@ -536,16 +536,16 @@ public class LayoutManager { } // TODO Rename to setNeedsLayout - public final void setNeedsUpdate(ManagedLayout layout) { - setWidthNeedsUpdate(layout); - setHeightNeedsUpdate(layout); + public final void setNeedsLayout(ManagedLayout layout) { + setNeedsHorizontalLayout(layout); + setNeedsVerticalLayout(layout); } - public final void setWidthNeedsUpdate(ManagedLayout layout) { + public final void setNeedsHorizontalLayout(ManagedLayout layout) { needsHorizontalLayout.add(layout); } - public final void setHeightNeedsUpdate(ManagedLayout layout) { + public final void setNeedsVerticalLayout(ManagedLayout layout) { needsVerticalLayout.add(layout); } diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java index 9542bb81d4..f9b03f04fa 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java @@ -151,14 +151,14 @@ public abstract class AbstractComponentConnector extends AbstractConnector if (newWidth.endsWith("%") != lastKnownWidth.endsWith("%")) { ComponentContainerConnector parent = getParent(); if (parent instanceof ManagedLayout) { - getLayoutManager().setWidthNeedsUpdate((ManagedLayout) parent); + getLayoutManager().setNeedsHorizontalLayout((ManagedLayout) parent); } } if (newHeight.endsWith("%") != lastKnownHeight.endsWith("%")) { ComponentContainerConnector parent = getParent(); if (parent instanceof ManagedLayout) { - getLayoutManager().setHeightNeedsUpdate((ManagedLayout) parent); + getLayoutManager().setNeedsVerticalLayout((ManagedLayout) parent); } } diff --git a/src/com/vaadin/terminal/gwt/client/ui/gridlayout/GridLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/gridlayout/GridLayoutConnector.java index 70b0952d9d..82f26383a1 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/gridlayout/GridLayoutConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/gridlayout/GridLayoutConnector.java @@ -160,7 +160,7 @@ public class GridLayoutConnector extends AbstractComponentContainerConnector updateCaption(child); } } - getLayoutManager().setNeedsUpdate(this); + getLayoutManager().setNeedsLayout(this); } @Override diff --git a/src/com/vaadin/terminal/gwt/client/ui/menubar/MenuBarConnector.java b/src/com/vaadin/terminal/gwt/client/ui/menubar/MenuBarConnector.java index abdeaae61e..d063c89ca9 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/menubar/MenuBarConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/menubar/MenuBarConnector.java @@ -149,7 +149,7 @@ public class MenuBarConnector extends AbstractComponentConnector implements } }// while - getLayoutManager().setWidthNeedsUpdate(this); + getLayoutManager().setNeedsHorizontalLayout(this); }// updateFromUIDL diff --git a/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java index 4a9190e0f1..47c16e7c40 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java @@ -91,7 +91,7 @@ public abstract class AbstractOrderedLayoutConnector extends caption.updateCaption(); } else { layout.setCaption(component.getWidget(), null); - getLayoutManager().setNeedsUpdate(this); + getLayoutManager().setNeedsLayout(this); } } @@ -137,7 +137,7 @@ public abstract class AbstractOrderedLayoutConnector extends layout.updateSpacingStyleName(getState().isSpacing()); - getLayoutManager().setNeedsUpdate(this); + getLayoutManager().setNeedsLayout(this); } private int getSizeForInnerSize(int size, boolean isVertical) { diff --git a/src/com/vaadin/terminal/gwt/client/ui/splitpanel/AbstractSplitPanelConnector.java b/src/com/vaadin/terminal/gwt/client/ui/splitpanel/AbstractSplitPanelConnector.java index f8fd2faf41..7340c2cbd9 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/splitpanel/AbstractSplitPanelConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/splitpanel/AbstractSplitPanelConnector.java @@ -134,7 +134,7 @@ public abstract class AbstractSplitPanelConnector extends // appearing/disappearing scrollbars into account. getConnection().runDescendentsLayout(getWidget()); - getLayoutManager().setNeedsUpdate(this); + getLayoutManager().setNeedsLayout(this); } diff --git a/src/com/vaadin/terminal/gwt/client/ui/table/TableConnector.java b/src/com/vaadin/terminal/gwt/client/ui/table/TableConnector.java index b53ee469cc..d84b8f01e0 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/table/TableConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/table/TableConnector.java @@ -292,7 +292,7 @@ public class TableConnector extends AbstractComponentContainerConnector getLayoutManager().setNeedsMeasure( TableConnector.this.getParent()); getLayoutManager() - .setHeightNeedsUpdate(TableConnector.this); + .setNeedsVerticalLayout(TableConnector.this); getLayoutManager().layoutNow(); } }); diff --git a/src/com/vaadin/terminal/gwt/client/ui/twincolselect/TwinColSelectConnector.java b/src/com/vaadin/terminal/gwt/client/ui/twincolselect/TwinColSelectConnector.java index 6f8773a4ce..328d0fc18b 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/twincolselect/TwinColSelectConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/twincolselect/TwinColSelectConnector.java @@ -23,7 +23,7 @@ public class TwinColSelectConnector extends OptionGroupBaseConnector implements // correctly if (isRealUpdate(uidl)) { getWidget().updateCaptions(uidl); - getLayoutManager().setWidthNeedsUpdate(this); + getLayoutManager().setNeedsHorizontalLayout(this); } super.updateFromUIDL(uidl, client); -- 2.39.5