if (DrawingEditor.VIEW_ADDED.equals(propertyName)) {
DrawingView view = (DrawingView) e.getNewValue();
//����id��figure��ӳ���
if (idToFigureMap != null) {
FigureEnumeration fe = view.getDrawing().getFigures();
while (fe.hasMoreElements()) {
Figure figure = fe.nextFigure();
idToFigureMap.add(figure.getAttribute("id"), figure);
}
}
} else if (DrawingEditor.VIEW_REMOVED.equals(propertyName)) {
DrawingView view = (DrawingView) e.getOldValue();
//����id��figure��ӳ���
if (idToFigureMap != null) {
FigureEnumeration fe = view.getDrawing().getFigures();
while (fe.hasMoreElements()) {
Figure figure = fe.nextFigure();
idToFigureMap.remove(figure.getAttribute("id"), figure);
}
}
}