@Override
	public ListingField getField(ProxyObj<?> proxy, int varWidth) {
		Object obj = proxy.getObject();

		if (!enabled) {
			return null;
		}
		boolean canOpen = false;
		int indentLevel = 0;
		boolean isLast = false;
		if (obj instanceof Data) {
			Data data = (Data) obj;
			canOpen = (data.getNumComponents() > 0);
			indentLevel = computeIndentLevel(data);
			isLast = computeIsLast(data);
		}

		if (canOpen) {
			return new OpenCloseField(this, proxy, indentLevel, getMetrics(), startX + varWidth,
				width, isLast);
		}
		else if (indentLevel > 0) {
			return new IndentField(this, proxy, indentLevel, getMetrics(), startX + varWidth, width,
				isLast);
		}
		return null;
	}
Returns the FactoryField for the given object at index index.
@param varWidth the amount of variable width spacing for any fields
before this one.
@param proxy the object whose properties should be displayed.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/OpenCloseFieldFactory.java