@Override
	public Insets getBorderInsets(Component c, Insets insets) {
		Insets borderInsets;
		if (border != null) {
			borderInsets = border.getBorderInsets(c);
		}
		else {
			borderInsets = new Insets(0, 0, 0, 0);
		}
		insets.top = EDGE_SPACING + TEXT_SPACING + borderInsets.top;
		insets.right = EDGE_SPACING + TEXT_SPACING + borderInsets.right;
		insets.bottom = EDGE_SPACING + TEXT_SPACING + borderInsets.bottom;
		insets.left = EDGE_SPACING + TEXT_SPACING + borderInsets.left;

		if (c == null || component == null) {
			return insets;
		}

		int compHeight = 0;
		if (component != null) {
			compHeight = component.getPreferredSize().height;
		}

		switch (titlePosition) {
			default:
			case ABOVE_TOP:
				insets.top += compHeight + TEXT_SPACING;
				break;
			case TOP:
			case DEFAULT_POSITION:
				insets.top += Math.max(compHeight, borderInsets.top) - borderInsets.top;
				break;
			case BELOW_TOP:
				insets.top += compHeight + TEXT_SPACING;
				break;
			case ABOVE_BOTTOM:
				insets.bottom += compHeight + TEXT_SPACING;
				break;
			case BOTTOM:
				insets.bottom += Math.max(compHeight, borderInsets.bottom) - borderInsets.bottom;
				break;
			case BELOW_BOTTOM:
				insets.bottom += compHeight + TEXT_SPACING;
				break;
		}
		return insets;
	}
A helper class to the InlineComponentTitledPanel that implements the component-in-border effect.
<p>
<b>This class should not be used outside InlineComponentTitledPanel.</b>
 @see docking.widgets.InlineComponentTitledPanel
Ghidra/Framework/Docking/src/main/java/docking/widgets/InlineComponentTitledBorder.java