From 916950353be5ff22db609a2d43748bc302e87a2a Mon Sep 17 00:00:00 2001 From: Steffen Schaefer Date: Wed, 29 Jan 2020 13:47:40 +0100 Subject: [PATCH] Code formatting --- .../home/shared/utils/CollapseAnimation.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/utils/CollapseAnimation.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/utils/CollapseAnimation.java index 55e9e88d82c..c232fb01223 100644 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/utils/CollapseAnimation.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/home/shared/utils/CollapseAnimation.java @@ -9,33 +9,33 @@ import com.google.gwt.dom.client.Style.Overflow; import com.google.gwt.dom.client.Style.Unit; public class CollapseAnimation extends Animation { - + private Element elementToAnimate; - + private boolean show = true; private int effectiveHeight; public CollapseAnimation(Element elementToAnimate) { this(elementToAnimate, true); } - + public CollapseAnimation(Element elementToAnimate, int effectiveHeight) { this(elementToAnimate, false); this.effectiveHeight = effectiveHeight; } - + public CollapseAnimation(Element elementToAnimate, boolean showInitial) { this.elementToAnimate = elementToAnimate; this.show = showInitial; elementToAnimate.getStyle().setOverflow(Overflow.HIDDEN); - if(!showInitial) { + if (!showInitial) { elementToAnimate.getStyle().setDisplay(Display.NONE); } } - + @Override protected void onComplete() { - if(!show) { + if (!show) { elementToAnimate.getStyle().setDisplay(Display.NONE); } else { elementToAnimate.getStyle().clearHeight(); @@ -44,14 +44,14 @@ public class CollapseAnimation extends Animation { @Override protected void onUpdate(double progress) { - if(!show) { + if (!show) { progress = 1.0 - progress; } elementToAnimate.getStyle().setHeight(effectiveHeight * progress, Unit.PX); } - + public void animate(boolean show) { - if(show && effectiveHeight == 0) { + if (show && effectiveHeight == 0) { Scheduler.get().scheduleDeferred(new ScheduledCommand() { @Override public void execute() {