@Override
	public int getColumnIndexAtX(int x) {
		if (x < 0) {
			return -1;
		}

		int cc = getColumnCount();
		int columnIndex = x;
		for (int i = 0; i < cc; i++) {
			TableColumn column = getColumn(i);
			columnIndex = columnIndex - column.getWidth();
			if (columnIndex < 0) {
				return i;
			}
		}
		return -1;
	}
This method will make sure that there are no existing columns in this model's complete
list of columns (visible and hidden) that have the same <b>table model</b> index as
the given index.  This prevents duplicate columns from being added, since clients of this
class do not know about hidden columns and may thus try to add a column that already
exists, but is hidden.
@param modelIndex The table model index of the column that should be removed
Ghidra/Framework/Docking/src/main/java/docking/widgets/table/GTableColumnModel.java