timeline.play();
}
private void hideControlButtons() {
setAnimationLock(true);
Timeline timeline = new Timeline();
KeyValue keyValue = new KeyValue(controlTabHeight, 0.0, Interpolator.EASE_IN);
timeline.getKeyFrames().clear();
timeline.getKeyFrames().add(new KeyFrame(Duration.millis(ANIMATION_SPEED), new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent event) {
if (!isShowTabsMenu()) {
downArrowBtn.setVisible(false);
}
// If the scroll arrows or tab menu is still visible we don't want
// to hide it animate it back it.
if (isShowTabsMenu()) {
showControlButtons = true;
} else {
setVisible(false);
popup.getItems().clear();
popup = null;
}
setAnimationLock(false);
// This needs to be called when we are in the left tabPosition
// to allow for the clip offset to move properly (otherwise
// it jumps too early - before the animation is done).
requestLayout();
}
}, keyValue));
timeline.play();
}