private void getCellsWithHigherPriorities(
    final DimensionInfo info,
    final boolean[] allowedCells,
    final boolean[] higherPriorityCells,
    final boolean checkPrefs,
    final int[] widths
  ) {
    Arrays.fill(higherPriorityCells, false);

    int foundCells = 0;

    if (checkPrefs) {
      // less that preferred size
      final int[] prefs = getMinOrPrefSizes(info, false);
      for (int cell = 0; cell < allowedCells.length; cell++) {
        if (!allowedCells[cell]) {
          continue;
        }
        if (!isCellEmpty(info, cell) && prefs[cell] > widths[cell]) {
          higherPriorityCells[cell] = true;
          foundCells++;
        }
      }

      if (foundCells > 0) {
        return;
      }
    }

    // want grow
    for (int cell = 0; cell < allowedCells.length; cell++) {
      if (!allowedCells[cell]) {
        continue;
      }
      if ((info.getCellSizePolicy(cell) & GridConstraints.SIZEPOLICY_WANT_GROW) != 0) {
        higherPriorityCells[cell] = true;
        foundCells++;
      }
    }

    if (foundCells > 0) {
      return;
    }

    // can grow
    for (int cell = 0; cell < allowedCells.length; cell++) {
      if (!allowedCells[cell]) {
        continue;
      }
      if ((info.getCellSizePolicy(cell) & GridConstraints.SIZEPOLICY_CAN_GROW) != 0) {
        higherPriorityCells[cell] = true;
        foundCells++;
      }
    }

    if (foundCells > 0) {
      return;
    }

    // non empty
    for (int cell = 0; cell < allowedCells.length; cell++) {
      if (!allowedCells[cell]) {
        continue;
      }
      if (!isCellEmpty(info, cell)) {
        higherPriorityCells[cell] = true;
        foundCells++;
      }
    }

    if (foundCells > 0) {
      return;
    }

    // any
    for (int cell = 0; cell < allowedCells.length; cell++) {
      if (!allowedCells[cell]) {
        continue;
      }
      higherPriorityCells[cell] = true;
    }
  }
private void getCellsWithHigherPriorities(
    final DimensionInfo info,
    final boolean[] allowedCells,
    final boolean[] higherPriorityCells,
    final boolean checkPrefs,
    final int[] widths
  )