private String getDataTypeName(DataTypeComponent dtc) {
		DataType dt = dtc.getDataType();
		StringBuilder buffer = new StringBuilder();
		buffer.append(dt.getName());
		if (dt instanceof BitFieldDataType && !((Composite) dtc.getParent()).isPackingEnabled()) {
			BitFieldDataType bfDt = (BitFieldDataType) dt;
			buffer.append("(");
			buffer.append(Integer.toString(bfDt.getBitOffset()));
			buffer.append(")");
		}
		return buffer.toString();
	}
Panel to show the contents of a Data Type.
Ghidra/Features/Base/src/main/java/ghidra/app/merge/datatypes/DataTypePanel.java