public boolean resourceIsInUse(String resourceName) {
   for (BShapeModel shapeModel : shapeModels.values())
     if (shapeModel.getImageName().equals(resourceName)) return true;
   return false;
 }
 public void removeShape(BShapeModel model) {
   if (model != null) shapeModels.remove(model.getName());
 }
 public void removeResource(String resourceName) {
   for (BShapeModel shapeModel : shapeModels.values())
     if (shapeModel.getImageName().equals(resourceName)) shapeModel.setImageName("");
   resources.remove(resourceName);
   resourceNames.remove(resourceName);
 }
 public void addShape(BShapeModel model) {
   if (model.getName() == null) model.setName(shapeCounter.getShapeName());
   shapeModels.put(model.getName(), model);
   model.setData(this);
 }