private boolean shiftComponentsUp(int startRowIndex, int endRowIndex) {
		int numComps = getNumComponents();
		if ((startRowIndex > endRowIndex) || startRowIndex <= 0 || startRowIndex >= numComps ||
			endRowIndex <= 0 || endRowIndex >= numComps) {
			return false;
		}
		return viewDTM.withTransaction("Shift Up", () -> {
			DataTypeComponent comp = getComponent(startRowIndex - 1);
			deleteComponent(startRowIndex - 1);
			try {
				insert(endRowIndex, comp.getDataType(), comp.getLength(), comp.getFieldName(),
					comp.getComment());
			}
			catch (InvalidDataTypeException e) {
				return false;
			}
			return true;
		});
	}
Moves the components between the start index (inclusive) and the end
 index (exclusive) to the new index (relative to the initial component set).

@param startRowIndex index of the starting component to move.
@param endRowIndex index of the ending component to move.
@return true if components are moved.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/CompEditorModel.java