protected void onCollapse() {
collapseBtn.changeStyle("my-tool-down");
if (animateCollapse && !animating) {
animating = true;
FXStyle fx = new FXStyle(body.getElement());
fx.duration = 300;
fx.addListener(Events.EffectComplete, new Listener() {
public void handleEvent(BaseEvent be) {
afterCollapse();
}
});
fx.slideOut(Style.NORTH);
} else {
body.setVisible(false);
afterCollapse();
}
}