private TextField createWrappingXrefRow(Program program, int startRow, List<Reference> xrefs,
			Function currentFunction, Predicate<Reference> isOffcut, int availableLines,
			FieldHighlightFactory hlFactory) {

		FontMetrics metrics = getMetrics();
		AttributedString delimiter = new AttributedString(delim, Colors.FOREGROUND, metrics);
		int row = startRow;
		List<XrefFieldElement> elements = new ArrayList<>();
		for (Reference ref : xrefs) {

			String prefix = getPrefix(program, ref, currentFunction, null);
			XrefFieldElement element =
				createReferenceElement(program, prefix, ref, row, delimiter, isOffcut.test(ref));
			elements.add(element);
			row++;
		}

		// add all elements to a field that will wrap as needed
		if (!elements.isEmpty()) {
			List<FieldElement> fieldElements = toFieldElements(elements, false);
			return new FlowLayoutTextField(fieldElements, startX, width, availableLines, hlFactory);
		}

		return null;
	}
Constructs a new XRefFieldFactory based on the provider and model.

@param name the owner of this field factory
@param model the model that the field belongs to.
@param hlProvider the HightLightProvider.
@param displayOptions the Options for display properties.
@param fieldOptions the Options for field specific properties.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/XRefFieldFactory.java