if (selectionChangeTransition != null) {
selectionChangeTransition.start(new TransitionListener() {
@Override
public void transitionCompleted(Transition transition) {
CardPane cardPane = (CardPane)getComponent();
SelectionChangeTransition selectionChangeTransition =
(SelectionChangeTransition)transition;
int selectedIndex = cardPane.indexOf(selectionChangeTransition.toCard);
cardPane.setSelectedIndex(selectedIndex);
CardPaneSkin.this.selectionChangeTransition = null;
}
});
}
}