private void scrollTo(T item) {
    Node node = nodeMap.get(item);

    if (node != null) {
      SelectionStrip strip = getSkinnable();

      strip.getProperties().remove(SCROLL_TO_KEY);

      final Bounds nodeBounds = node.localToParent(node.getLayoutBounds());

      final double x = -nodeBounds.getMinX() + strip.getWidth() / 2 - nodeBounds.getWidth() / 2;

      final double x1 = -translateX.get();
      final double x2 = x1 + strip.getLayoutBounds().getWidth();

      if (x1 > nodeBounds.getMinX() || x2 < nodeBounds.getMaxX()) {
        if (strip.isAnimateScrolling()) {
          KeyValue keyValue = new KeyValue(translateX, x);
          KeyFrame keyFrame = new KeyFrame(strip.getAnimationDuration(), keyValue);

          Timeline timeline = new Timeline(keyFrame);
          timeline.play();
        } else {
          translateX.set(x);
        }
      }
    }
  }
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