37a38,42 > * the registered listeners for selection changes > */ > private transient Vector fSelectionListeners; > > /** 106a112,113 > fSelectionListeners = new Vector(); > addFigureSelectionListener(editor()); 132,132c139,139 < return fEditor.tool(); --- > return editor().tool(); 214a222,229 > * Sets the current display update strategy. > * @see Painter > */ > public Painter getDisplayUpdate() { > return fUpdateStrategy; > } > > /** 264a280,280 > fireSelectionChanged(); 265,265d279 < selectionChanged(); 285a301,301 > fireSelectionChanged(); 286,286d300 < selectionChanged(); 298a314,314 > fireSelectionChanged(); 299,299d313 < selectionChanged(); 313a329,329 > fireSelectionChanged(); 314,314d328 < selectionChanged(); 339,339c354,354 < return new FigureSelection(selectionZOrdered()); --- > return new StandardFigureSelection(selectionZOrdered()); 362a378,384 > protected void fireSelectionChanged() { > if (fSelectionListeners != null) { > for (int i = 0; i < fSelectionListeners.size(); i++) { > FigureSelectionListener l = (FigureSelectionListener)fSelectionListeners.elementAt(i); > l.figureSelectionChanged(this); > } > } 363,364d377 < protected void selectionChanged() { < fEditor.selectionChanged(this); 498,498d517 < 539,545d557 < * Updates the drawing view. < */ < public void update(Graphics g) { < paint(g); < } < < /** 550,550c562,562 < public void paint(Graphics g) { --- > protected void paintComponent(Graphics g) { 551,551c563,563 < fUpdateStrategy.draw(g, this); --- > getDisplayUpdate().draw(g, this); 681a694,694 > fSelectionListeners= new Vector(); 708a722,737 > > /** > * 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); > }