Removes an information color @param ic @throws java.lang.Exception
(InformationColor ic)
| 524 | * @throws java.lang.Exception |
| 525 | */ |
| 526 | public void removeInformationColor(InformationColor ic) throws Exception { |
| 527 | if(ic != null){ |
| 528 | if(!informationColors.containsValue(ic)) throw new Exception("Tried to remove information color that does not belong to this world"); |
| 529 | // remode from information color list |
| 530 | informationColors.remove(ic.getId()); |
| 531 | // removePlace from places |
| 532 | for(Layer layer: getLayers()){ |
| 533 | for(Place place: layer.getPlaces()){ |
| 534 | if(place.getInfoRing() == ic) place.setInfoRing(null); |
| 535 | } |
| 536 | } |
| 537 | |
| 538 | callListeners(ic); |
| 539 | } |
| 540 | } |
| 541 | |
| 542 | // --------- preference ---------------------------------------------------- |
| 543 | /** |