boolean (final DimensionInfo info, final int cellIndex) { if (cellIndex < 0 || cellIndex >= info.getCellCount()) { throw new IllegalArgumentException("wrong cellIndex: " + cellIndex + "; cellCount=" + info.getCellCount()); } for (int i = 0; i < info.getComponentCount(); i++) { final Component component = info.getComponent(i); if (info.getCell(i) == cellIndex && !(component instanceof Spacer)) { return false; } } return true; }