@Override
	public void autoscroll(Point p) {
		if (Platform.CURRENT_PLATFORM.getOperatingSystem() != OperatingSystem.WINDOWS) {
			autoscrollNonWindows();
			return;
		}

		Rectangle visRect = component.getVisibleRect();
		int scrollAmount = 0;
		if (p.y < visRect.y + MARGIN) {
			scrollAmount = -((visRect.y + MARGIN - p.y) * scrollIncrement) / 2;
		}
		else if (p.y > visRect.y + visRect.height - MARGIN) {
			scrollAmount = ((p.y - (visRect.y + visRect.height - MARGIN)) * scrollIncrement) / 2;
		}
		visRect.y += scrollAmount;
		int compHeight = component.getSize().height;
		if (visRect.y < 0) {
			visRect.y = 0;
		}
		else if (visRect.y >= compHeight - visRect.height) {
			visRect.y = compHeight - visRect.height - 1;
		}
		component.scrollRectToVisible(visRect);
	}
Constructor
@param component component that is scrollable
@param scrollIncrement value to use to calculate the new
visible rectangle for scrolling
Ghidra/Framework/Docking/src/main/java/docking/widgets/table/AutoscrollAdapter.java