38,42d37 < * the registered listeners for selection changes < */ < private transient Vector fSelectionListeners; < < /** 112,113d106 < fSelectionListeners = new Vector(); < addFigureSelectionListener(editor()); 139,139c132,132 < return editor().tool(); --- > return fEditor.tool(); 222,229d214 < * Sets the current display update strategy. < * @see Painter < */ < public Painter getDisplayUpdate() { < return fUpdateStrategy; < } < < /** 279a265,265 > selectionChanged(); 280,280d264 < fireSelectionChanged(); 300a286,286 > selectionChanged(); 301,301d285 < fireSelectionChanged(); 313a299,299 > selectionChanged(); 314,314d298 < fireSelectionChanged(); 328a314,314 > selectionChanged(); 329,329d313 < fireSelectionChanged(); 354,354c339,339 < return new StandardFigureSelection(selectionZOrdered()); --- > return new FigureSelection(selectionZOrdered()); 377a363,364 > protected void selectionChanged() { > fEditor.selectionChanged(this); 378,384d362 < protected void fireSelectionChanged() { < if (fSelectionListeners != null) { < for (int i = 0; i < fSelectionListeners.size(); i++) { < FigureSelectionListener l = (FigureSelectionListener)fSelectionListeners.elementAt(i); < l.figureSelectionChanged(this); < } < } 517a498,498 > 557a539,545 > * Updates the drawing view. > */ > public void update(Graphics g) { > paint(g); > } > > /** 562,562c550,550 < protected void paintComponent(Graphics g) { --- > public void paint(Graphics g) { 563,563c551,551 < getDisplayUpdate().draw(g, this); --- > fUpdateStrategy.draw(g, this); 694,694d681 < fSelectionListeners= new Vector(); 722,737d708 < < /** < * Add a listener for selection changes. < * @param fsl jhotdraw.framework.FigureSelectionListener < */ < public void addFigureSelectionListener(FigureSelectionListener fsl) { < fSelectionListeners.add(fsl); < } < < /** < * Remove a listener for selection changes. < * @param fsl jhotdraw.framework.FigureSelectionListener < */ < public void removeFigureSelectionListener(FigureSelectionListener fsl) { < fSelectionListeners.remove(fsl); < }