private void updateScrolledState() {
    if (myContent == null || myScrollPaneTracker == null) {
      return;
    }
    var oldState = isScrolled();
    var newState = false;
    for (ScrollPaneScrolledState scrollPaneState : myScrollPaneTracker.getScrollPaneStates()) {
      var scrollPane = scrollPaneState.getScrollPane();
      boolean scrolled = myVertical ? !scrollPaneState.getState().isVerticalAtStart() : !scrollPaneState.getState().isHorizontalAtStart();
      if (isTouchingToolbar(scrollPane) && scrolled) {
        newState = true;
        break;
      }
    }
    if (newState != oldState) {
      ClientProperty.put(myContent, SCROLLED_STATE, newState);
      repaint();
    }
    var key = myVertical ? ScrollableContentBorder.TOOLBAR_WITH_BORDER_ABOVE : ScrollableContentBorder.TOOLBAR_WITH_BORDER_LEFT;
    for (ScrollPaneScrolledState scrollPaneState : myScrollPaneTracker.getScrollPaneStates()) {
      var targetComponent = ScrollableContentBorder.getTargetComponent(scrollPaneState.getScrollPane());
      if (targetComponent == null) {
        continue;
      }
      var hadToolbarWithBorder = ClientProperty.isTrue(targetComponent, key);
      var hasToolbarWithBorder = isTouchingToolbar(targetComponent) && (!ExperimentalUI.isNewUI() || newState);
      if (hasToolbarWithBorder != hadToolbarWithBorder) {
        ClientProperty.put(targetComponent, key, hasToolbarWithBorder);
        targetComponent.repaint();
      }
    }
  }
private void updateScrolledState()