private void scroll(boolean scrollToRight) {
    // In case of the timeline is already playing the animation must first finish.
    if (timeline != null && timeline.getStatus().equals(Animation.Status.RUNNING)) {
      timeline.stop();
    }

    double scrollDistance = getSkinnable().getWidth() / 2;
    double dist = scrollToRight ? scrollDistance : -scrollDistance;

    if (getSkinnable().isAnimateScrolling()) {
      KeyValue keyValue = new KeyValue(translateX, translateX.get() + dist, Interpolator.EASE_BOTH);
      KeyFrame keyFrame = new KeyFrame(Duration.millis(500), keyValue);

      timeline = new Timeline(keyFrame);
      timeline.play();
    } else {
      translateX.set(translateX.get() + dist);
    }
  }
Constructor for all SkinBase instances.

@param strip The strip for which this Skin should attach to.
workbenchfx-core/src/main/java/com/dlsc/workbenchfx/view/controls/selectionstrip/SelectionStripSkin.java