From 36e5097b6078b82c0a7a8a3055505d4c15904894 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Fri, 3 Aug 2012 07:50:47 +0000 Subject: [PATCH] Renamed method to better reflect what it does (#6219, #8399) svn changeset:24049/svn branch:6.8 --- .../terminal/gwt/client/ui/VMenuBar.java | 2 +- .../terminal/gwt/client/ui/VOverlay.java | 20 +++++++++---------- .../terminal/gwt/client/ui/VPopupView.java | 4 +++- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java b/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java index d0c5952de2..d89cec9ad6 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java @@ -793,7 +793,7 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable, contentWidth + Util.getNativeScrollbarSize(), Unit.PX); } - popup.sizeUpdated(); + popup.sizeOrPositionUpdated(); } } return top; diff --git a/src/com/vaadin/terminal/gwt/client/ui/VOverlay.java b/src/com/vaadin/terminal/gwt/client/ui/VOverlay.java index 6f4c5e70bb..31ed3ebb5d 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VOverlay.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VOverlay.java @@ -224,7 +224,7 @@ public class VOverlay extends PopupPanel implements CloseHandler { style.setMarginLeft(-adjustByRelativeLeftBodyMargin(), Unit.PX); style.setMarginTop(-adjustByRelativeTopBodyMargin(), Unit.PX); super.setPopupPosition(left, top); - sizeUpdated(isAnimationEnabled() ? 0 : 1); + sizeOrPositionUpdated(isAnimationEnabled() ? 0 : 1); } private IFrameElement getShimElement() { @@ -315,7 +315,7 @@ public class VOverlay extends PopupPanel implements CloseHandler { if (isAnimationEnabled()) { new ResizeAnimation().run(POPUP_PANEL_ANIMATION_DURATION); } else { - sizeUpdated(1.0); + sizeOrPositionUpdated(1.0); } Util.runIE7ZeroSizedBodyFix(); } @@ -347,13 +347,13 @@ public class VOverlay extends PopupPanel implements CloseHandler { @Override public void setWidth(String width) { super.setWidth(width); - sizeUpdated(1.0); + sizeOrPositionUpdated(1.0); } @Override public void setHeight(String height) { super.setHeight(height); - sizeUpdated(1.0); + sizeOrPositionUpdated(1.0); } /** @@ -377,15 +377,15 @@ public class VOverlay extends PopupPanel implements CloseHandler { * size of overlay without using normal 'setWidth(String)' and * 'setHeight(String)' methods (if not calling super.setWidth/Height). * - * @deprecated Call {@link #sizeUpdated()} instead. + * @deprecated Call {@link #sizeOrPositionUpdated()} instead. */ @Deprecated protected void updateShadowSizeAndPosition() { - sizeUpdated(); + sizeOrPositionUpdated(); } - protected void sizeUpdated() { - sizeUpdated(1.0); + protected void sizeOrPositionUpdated() { + sizeOrPositionUpdated(1.0); } /** @@ -398,7 +398,7 @@ public class VOverlay extends PopupPanel implements CloseHandler { * A value between 0.0 and 1.0, indicating the progress of the * animation (0=start, 1=end). */ - private void sizeUpdated(final double progress) { + private void sizeOrPositionUpdated(final double progress) { // Don't do anything if overlay element is not attached if (!isAttached()) { return; @@ -499,7 +499,7 @@ public class VOverlay extends PopupPanel implements CloseHandler { protected class ResizeAnimation extends Animation { @Override protected void onUpdate(double progress) { - sizeUpdated(progress); + sizeOrPositionUpdated(progress); } } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VPopupView.java b/src/com/vaadin/terminal/gwt/client/ui/VPopupView.java index 50e4a05e82..6a46d64c5a 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VPopupView.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VPopupView.java @@ -34,6 +34,7 @@ import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.VCaption; import com.vaadin.terminal.gwt.client.VCaptionWrapper; +import com.vaadin.terminal.gwt.client.VConsole; import com.vaadin.terminal.gwt.client.VTooltip; import com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler.ShortcutActionHandlerOwner; import com.vaadin.terminal.gwt.client.ui.richtextarea.VRichTextArea; @@ -300,6 +301,7 @@ public class VPopupView extends HTML implements Container, Iterable { @Override public void hide(boolean autoClosed) { + VConsole.log("Hiding popupview"); hiding = true; syncChildren(); unregisterPaintables(); @@ -475,7 +477,7 @@ public class VPopupView extends HTML implements Container, Iterable { } public boolean requestLayout(Set child) { - popup.sizeUpdated(); + popup.sizeOrPositionUpdated(); return true; } -- 2.39.5