Math.
You know the position of the items. You know the position of the panel and its clipped area (UIPanel.finalClipRegion). The rest is math.
If you need an example UICenterOnChild does it for you. If you don't want to do math, UICenterOnChild.centeredObject gives you what it's currently centered on.