}
this.currentAnimator = new PropertyAnimator(nextWidget,
this.getDirection(), high, low, this.getMutationStrategy(),
1000,
new AnimationFinishedCallback() {
public void onFailure(PropertyAnimator animator, Exception e) {
currentAnimator = null;
clear();
add(w);
currentWidget = nextWidget;
toWidget = null;
}
public void onFinish(PropertyAnimator animator) {
currentWidget = nextWidget;
toWidget = null;
nextWidget.setTop("0px");
currentAnimator = null;
}
});
if (currentWidget != null) {
final Widget oldWidget = (Widget) currentWidget.getUIObject();
int totalOffset = this.currentWidget.getUIObject().getOffsetHeight() +
Dimensions.INSTANCE.getTotalVerticalMargin(this.currentWidget.getUIObject()
.getElement());
Logger.getAnonymousLogger().log( Level.SPAM, "Total offset " + totalOffset, null);
if (this.getDirection().equals(SlideTransitionSimplePanel.HORIZONTAL)) {
nextWidget.setTop("-" + totalOffset + "px");
}
PropertyAnimator old = new PropertyAnimator(currentWidget,
this.getDirection(), "0%", "-100%",
this.getMutationStrategy(), 1000,
new AnimationFinishedCallback() {
public void onFailure(PropertyAnimator animator,
Exception e) {
Logger.getAnonymousLogger().log( Level.INFO, "Exception animating transition", e);
}