private String checkForClipping(JLabel label, String text) {

		Point helpPoint = getHelpIconLocation();
		int padding = 5;

		int iconWidth = primaryIcon.getIconWidth();
		if (iconWidth == 0) {
			// no icon; no padding needed
			padding = 0;
		}

		int iconStartX = helpPoint.x - iconWidth - padding;

		FontMetrics metrics = label.getFontMetrics(label.getFont());
		Rectangle bounds = label.getBounds();

		// the icon x is calculated from the right; some padding so the text does not hit the icon
		int availableTextWidth = iconStartX - padding;

		//@formatter:off
		Rectangle viewBounds = new Rectangle(0, 0, availableTextWidth, bounds.height);
		Rectangle iconResult = new Rectangle();
		Rectangle textResult = new Rectangle();
		String clippedText = SwingUtilities.layoutCompoundLabel(label, metrics, text, primaryIcon,
			label.getVerticalAlignment(), label.getHorizontalAlignment(),
			label.getVerticalTextPosition(), label.getHorizontalTextPosition(),
			viewBounds,
			iconResult,
			textResult,
			label.getIconTextGap());
		//@formatter:on
		return clippedText;
	}
Sets the an emphasis value for this column that is used to slightly enlarge and call out the
sort for the column.  
@param sortEmphasis the emphasis value
Ghidra/Framework/Docking/src/main/java/docking/widgets/table/GTableHeaderRenderer.java