/** * Clear a specific list of Coords from the hex image cache. * @param coords */ public void clearHexImageCache(Set<Coords> coords) { for (Coords c : coords) { hexImageCache.remove(c); } }
public synchronized void clearHex(IHex hex) { basesCache.remove(hex); }
public synchronized void boardChangedHex(BoardEvent b) { hexImageCache.remove(b.getCoords()); IHex hex = game.getBoard().getHex(b.getCoords()); tileManager.clearHex(hex); tileManager.waitForHex(hex); clearShadowMap(); // Maybe have to set the hexes' theme. Null clientgui implies board editor - don't mess with theme if ((selectedTheme != null) && !selectedTheme.equals("(Original Theme)") && (clientgui != null)) { if (selectedTheme.equals("(No Theme)") && (hex.getTheme() != null) && !hex.getTheme().equals("")) { hex.setTheme(""); game.getBoard().setHex(b.getCoords(), hex); } else if (!selectedTheme.equals(hex.getTheme())) { hex.setTheme(selectedTheme); game.getBoard().setHex(b.getCoords(), hex); } } repaint(); }