Color (final int i) { if (mySelectionModel.isSelectedIndex(i)) { return LightColors.BLUE; } if (mySelectedContainer != null) { if (i >= 0 && i < mySelectedContainer.getGridCellCount(myIsRow)) { final GridChangeUtil.CellStatus status = GridChangeUtil.canDeleteCell(mySelectedContainer, i, myIsRow); if (status == GridChangeUtil.CellStatus.Empty || status == GridChangeUtil.CellStatus.Redundant) { return Color.PINK; } } } return LightColors.GREEN; }