protected int moveForward(MenuSelectionManager manager, MenuElement[] path,
			int offset) {

		JPopupMenu popup = getLeafPopupMenu(path);
		if (popup == null) {
			return -1;
		}

		int itemCount = getItemCount(popup);
		if (itemCount == 0) {
			return -1;
		}

		// handle wrapping around to the top again
		int updatedOffset = offset >= itemCount ? offset % itemCount : offset;
		int progress = 0;
		int n = popup.getComponentCount();
		for (int i = 0; i < n; i++) {
			Component c = popup.getComponent(i);
			if (isValidItem(c)) {
				if (progress == updatedOffset) {
					return i;
				}
				progress++;
			}
		}

		return -1;
	}
The work method of this handler.  This method will only be called when a menu or popup
menu is open.

@param manager the active menu selection manager
@param path the active menu path
Ghidra/Framework/Docking/src/main/java/docking/menu/keys/MenuKeyHandler.java