@Override
	public boolean isAddAllowed(int rowIndex, DataType datatype) {
		if (datatype.equals(DataType.DEFAULT)) {
			return false;
		}
		// Don't allow arrays to be dropped on pointers or arrays.
		if (datatype instanceof Array) {
			DataTypeComponent comp = getComponent(rowIndex);
			if (comp != null) {
				DataType compDt = comp.getDataType();
				if (compDt instanceof Array || compDt instanceof Pointer) {
					return false;
				}
			}
		}

		return true;
	}
Returns whether or not addition of the specified component is allowed
at the specified index. the addition could be an insert or replace as
determined by the state of the edit model.

@param rowIndex index of the row in the union table.
@param datatype the data type to be inserted.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/UnionEditorModel.java