public DataTypeComponent replace(DataType dataType) throws UsrException {
		if (isContiguousComponentSelection()) {
			return replace(getMinIndexSelected(), dataType);
		}
		return null;
	}
Adds the specified data type at the specified component index. Whether
an insert or replace occurs depends on whether the indicated index is
in a selection and whether in locked or unlocked mode.

@param rowIndex the index of the row where the data type should be added.
@param dt the data type to add
@param dtLength datatype instance length
@return the component is added, null if it doesn't.
@throws UsrException if add fails
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/CompEditorModel.java