Search in sources :

Example 1 with AfterAnimateEvent

use of com.sencha.gxt.fx.client.animation.AfterAnimateEvent in project activityinfo by bedatadriven.

the class LogicalTabPanel method scrollTo.

private void scrollTo(int pos, boolean animate) {
    XElement stripWrap = getStripWrap();
    if (animate) {
        Fx fx = new Fx();
        fx.addAfterAnimateHandler(new AfterAnimateHandler() {

            @Override
            public void onAfterAnimate(AfterAnimateEvent event) {
                appearance.updateScrollButtons(getElement());
            }
        });
        stripWrap.<FxElement>cast().scrollTo(ScrollDirection.LEFT, pos, true, fx);
    } else {
        stripWrap.setScrollLeft(pos);
        appearance.updateScrollButtons(getElement());
    }
}
Also used : Fx(com.sencha.gxt.fx.client.animation.Fx) XElement(com.sencha.gxt.core.client.dom.XElement) AfterAnimateEvent(com.sencha.gxt.fx.client.animation.AfterAnimateEvent) AfterAnimateHandler(com.sencha.gxt.fx.client.animation.AfterAnimateEvent.AfterAnimateHandler)

Aggregations

XElement (com.sencha.gxt.core.client.dom.XElement)1 AfterAnimateEvent (com.sencha.gxt.fx.client.animation.AfterAnimateEvent)1 AfterAnimateHandler (com.sencha.gxt.fx.client.animation.AfterAnimateEvent.AfterAnimateHandler)1 Fx (com.sencha.gxt.fx.client.animation.Fx)1