@Override
	public void paint(JComponent c, Graphics g, PaintContext context,
			Rectangle clip, FieldBackgroundColorManager map, RowColLocation cursorLoc,
			int rowHeight) {

		// center in the heightAbove area (negative, since 0 is the baseline of text, which is at
		// the bottom of the heightAbove)
		int toggleHandleStartY = -((heightAbove / 2) + (toggleHandleSize / 2));
		int toggleHandleStartX = startX + (indentLevel * fieldWidth) + insetSpace;

		// TODO: If we're in printing mode, trying to render these open/close images
		//       causes the JVM to bomb. We'd like to eventually figure out why but in
		//       the meantime we can safely comment this out and still generate an acceptable
		//       image.
		//
		if (!context.isPrinting()) {
			if (isOpen) {
				g.drawImage(OPEN_ICON.getImageIcon().getImage(), toggleHandleStartX,
					toggleHandleStartY, context.getBackground(), null);
			}
			else {
				g.drawImage(CLOSED_ICON.getImageIcon().getImage(), toggleHandleStartX,
					toggleHandleStartY, context.getBackground(), null);
			}
		}

		g.setColor(Palette.LIGHT_GRAY);

		// draw the vertical lines to the left of the toggle handle (these are shown when
		// there are vertical bars drawn for inset data)
		int fieldTopY = -heightAbove;
		int fieldBottomY = heightBelow;
		int toggleHandleHalfLength = toggleHandleSize / 2;
		for (int i = 1; i < indentLevel; i++) {
			int fieldOffset = i * fieldWidth;
			int previousButtonStartX = startX + fieldOffset + insetSpace;
			int midpointX = previousButtonStartX + toggleHandleHalfLength;
			g.drawLine(midpointX, fieldTopY, midpointX, fieldBottomY);
		}

		if (indentLevel > 0) {
			// horizontal line to the right of the toggle handle
			int indentOffset = getWidth();
			int toggleHandleEndX = toggleHandleStartX + toggleHandleSize;
			int midpointY = toggleHandleStartY + (toggleHandleSize / 2);
			int endX = startX + indentOffset;
			g.drawLine(toggleHandleEndX, midpointY, endX, midpointY);

			// vertical line above toggle handle
			int midpointX = toggleHandleStartX + toggleHandleHalfLength;
			int endY = toggleHandleStartY - insetSpace;
			g.drawLine(midpointX, fieldTopY, midpointX, endY);

			boolean lastAndClosed = isLast && !isOpen;
			if (!lastAndClosed) {
				// extended vertical line below toggle handle
				int buttonBottomY = toggleHandleStartY + toggleHandleSize;
				g.drawLine(midpointX, buttonBottomY, midpointX, fieldBottomY);
			}
		}

		paintCursor(g, context.getCursorColor(), cursorLoc);
	}
Sets the starting vertical position of this field.
@param startY the starting vertical position.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/OpenCloseField.java