@Override
	public int getCol(int row, int x) {
		if (x < startX) {
			x = startX;
		}
		else if (x >= startX + width) {
			x = startX + width - 1;
		}
		int col = findColumn(text, x - startX);
		if (col >= this.numCols) {
			col = numCols - 1;
		}
		return col;
	}
@see docking.widgets.fieldpanel.field.Field#getCol(int, int)
Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/field/SimpleTextField.java