GridData getData(Control[][] grid, int row, int column, int rowCount,
			int columnCount, boolean first) {
		Control control = grid[row][column];
		if (control != null) {
			GridData data = (GridData) control.getLayoutData();
			int hSpan = Math.max(1, Math.min(data.horizontalSpan, columnCount));
			int vSpan = Math.max(1, data.verticalSpan);
			int i = first ? row + vSpan - 1 : row - vSpan + 1;
			int j = first ? column + hSpan - 1 : column - hSpan + 1;
			if (0 <= i && i < rowCount) {
				if (0 <= j && j < columnCount) {
					if (control == grid[i][j])
						return data;
				}
			}
		}
		return null;
	}