public void setMatches(Match[] matches) { cellToMatches = new HashMap<ItemCell, List<Match>>(); for (Match match : matches) { ItemCell cell = getCell(match); List<Match> list = cellToMatches.get(cell); if (list == null) { list = new ArrayList<Match>(); cellToMatches.put(cell, list); } list.add(match); } decorator.clearStyles(); for (ItemCell cell : cellToMatches.keySet()) { updateCell(cell); } decorator.redraw(); }