private Icon getSortIcon(Icon icon, int realIndex, TableModel model) {
		SortedTableModel sortedModel = (SortedTableModel) model;
		TableSortState columnSortStates = sortedModel.getTableSortState();

		boolean sortPending = false;
		if (model instanceof AbstractSortedTableModel) {
			@SuppressWarnings("rawtypes")
			AbstractSortedTableModel abstractSortedModel = (AbstractSortedTableModel) model;
			sortPending = abstractSortedModel.isSortPending();
			if (sortPending) {
				TableSortState pendingTableState = abstractSortedModel.getPendingSortState();
				ColumnSortState pendingColumnState =
					pendingTableState.getColumnSortState(realIndex);
				if (pendingColumnState != null) {
					return getColumnIconForSortState(columnSortStates, pendingColumnState, true);
				}
			}
		}

		ColumnSortState sortState = columnSortStates.getColumnSortState(realIndex);
		if (sortState == null) {
			return null;
		}

		icon = getColumnIconForSortState(columnSortStates, sortState, false);
		if (sortPending) {
			// indicate that the current sort is stale
			icon = ResourceManager.getDisabledIcon(icon, 65);
		}

		return icon;
	}
Paints a background highlight under the icon that will get painted.
@param g2d the graphics
@param scale the current scale, up to max 
@param max the max emphasis size
@param ix the icon x
@param iy the icon y
@param iw the icon width
@param ih the icon height
Ghidra/Framework/Docking/src/main/java/docking/widgets/table/GTableHeaderRenderer.java