@Override
 public void figureChanged(FigureEvent e) {
   quadTree.remove(e.getFigure());
   quadTree.add(e.getFigure(), e.getFigure().getDrawingArea());
   needsSorting = true;
   fireAreaInvalidated(e.getInvalidatedArea());
 }
 @Override
 public void areaInvalidated(FigureEvent e) {
   fireAreaInvalidated(e.getInvalidatedArea());
 }