38,42d37 < * the registered listeners for selection changes < */ < private transient Vector fSelectionListeners; < < /** 112,113d106 < fSelectionListeners = new Vector(); < addFigureSelectionListener(editor()); 139c132 < return editor().tool(); --- > return fEditor.tool(); 222,229d214 < * Sets the current display update strategy. < * @see Painter < */ < public Painter getDisplayUpdate() { < return fUpdateStrategy; < } < < /** 280c265 < fireSelectionChanged(); --- > selectionChanged(); 301c286 < fireSelectionChanged(); --- > selectionChanged(); 314c299 < fireSelectionChanged(); --- > selectionChanged(); 329c314 < fireSelectionChanged(); --- > selectionChanged(); 354c339 < return new StandardFigureSelection(selectionZOrdered()); --- > return new FigureSelection(selectionZOrdered()); 378,384c363,364 < protected void fireSelectionChanged() { < if (fSelectionListeners != null) { < for (int i = 0; i < fSelectionListeners.size(); i++) { < FigureSelectionListener l = (FigureSelectionListener)fSelectionListeners.elementAt(i); < l.figureSelectionChanged(this); < } < } --- > protected void selectionChanged() { > fEditor.selectionChanged(this); 517a498 > 557a539,545 > * Updates the drawing view. > */ > public void update(Graphics g) { > paint(g); > } > > /** 562,563c550,551 < protected void paintComponent(Graphics g) { < getDisplayUpdate().draw(g, this); --- > public void paint(Graphics g) { > fUpdateStrategy.draw(g, this); 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); < }