void showHighlighter(JLayeredPane layeredPane, final RelativeRectangle rectangle, final int aType, final DnDEvent event) {
    final Rectangle bounds = rectangle.getRectangleOn(layeredPane);
    // update selected row bounds according to the visible rectangle
    RelativePoint point = rectangle.getPoint();
    Component component = point == null ? null : point.getOriginalComponent();
    if (component instanceof JTree tree) {
      Rectangle visible = tree.getVisibleRect();
      int dx = point.getOriginalPoint().x - visible.x;
      if (aType == DnDEvent.DropTargetHighlightingType.RECTANGLE || dx < 0) {
        bounds.x -= dx;
        bounds.width = visible.width;
      }
      else {
        bounds.width = visible.width - dx;
      }
    }
    else if (component instanceof JList<?> list) {
      if (JList.VERTICAL == list.getLayoutOrientation()) {
        Rectangle visible = list.getVisibleRect();
        int dx = point.getOriginalPoint().x - visible.x;
        bounds.x -= dx;
        bounds.width = visible.width;
      }
    }
    showHighlighter(layeredPane, event, bounds, aType);
  }
void showHighlighter(JLayeredPane layeredPane, final RelativeRectangle rectangle, final int aType, final DnDEvent event)