2,2c2,2 < * @(#)Drawing.java 5.2 --- > * @(#)Drawing.java 3a4,9 > * Project: JHotdraw - a GUI framework for technical drawings > * http://www.jhotdraw.org > * http://jhotdraw.sourceforge.net > * Copyright: © by the original author(s) and all contributors > * License: Lesser GNU Public License (LGPL) > * http://www.opensource.org/licenses/lgpl-license.html 11,11c17,17 < import java.io.*; --- > import java.io.Serializable; 27a34,36 > * > * @author Wolfram Kaiser > * @version <$CURRENT_VERSION$> 107a117,123 > * Checks if the composite figure has the argument as one of > * its children. > * @return true if the figure is part of this Drawing, else otherwise > */ > public boolean includes(Figure figure); > > /** 118a135,136 > * > * @return new enumeration of all registered change listener 123a142,143 > * > * @param figure to be added to the drawing 123,123c141,141 < * Adds a figure and sets its container to refer --- > * Adds a figure and sets its container to refer to this drawing. 124,124d141 < * to this drawing. 125,125c144,144 < * @return the figure that was inserted. --- > * @return the figure that was inserted (might be different from the figure specified). 130a150,151 > * > * @deprecated use addAll(FigureEnumeration) instead 134a156,163 > * Adds a FigureEnumeration of figures. > * > * @param fe (unused) enumeration containing all figures to be added > * @see #add > */ > public void addAll(FigureEnumeration fe); > > /** 135a165,167 > * > * @param figure that is part of the drawing and should be removed > * @return the figure that has been removed (might be different from the figure specified) 142a175,176 > * > * @param figure that is part of the drawing and should be added 148a183,191 > * > * @see #orphan > * @deprecated use orphanAll(FigureEnumeration) instead > */ > public void orphanAll(Vector orphanFigures); > > /** > * Removes a FigureEnumeration of figures from the figure's list > * without releasing the figures. 151,151c194,194 < public void orphanAll(Vector newFigures); --- > public void orphanAll(FigureEnumeration fe); 154a198,198 > * 155a200,200 > * @deprecated use removeAll(FigureEnumeration) instead 159a205,210 > * Removes a FigureEnumeration of figures. > * @see #remove > */ > public void removeAll(FigureEnumeration fe); > > /** 160,160c211,211 < * Replaces a figure in the drawing without --- > * Replaces a figure in the drawing without removing it from the drawing. 161a213,216 > * > * @param figure figure to be replaced > * @param replacement figure that should replace the specified figure > * @return the figure that has been inserted (might be different from the figure specified) 161,161c212,212 < * removing it from the drawing. --- > * The figure to be replaced must be part of the drawing. 163,163c218,218 < public void replace(Figure figure, Figure replacement); --- > public Figure replace(Figure figure, Figure replacement); 166a222,223 > * > * @param figure that is part of the drawing 171a229,230 > * > * @param figure that is part of the drawing 175a235,275 > * Sends a figure to a certain layer within a drawing. Each figure > * lays in a unique layer and the layering order decides which > * figure is drawn on top of another figure. Figures with a higher > * layer number have usually been added later and may overlay > * figures in lower layers. Layers are counted from to (the number > * of figures - 1). > * The figure is removed from its current layer (if it has been already > * part of this drawing) and is transferred to the specified layers after > * all figures between the original layer and the new layer are shifted to > * one layer below to fill the layer sequence. It is not possible to skip a > * layer number and if the figure is sent to a layer beyond the latest layer > * it will be added as the last figure to the drawing and its layer number > * will be set to the be the one beyond the latest layer so far. > * > * @param figure figure to be sent to a certain layer > * @param layerNr target layer of the figure > */ > public void sendToLayer(Figure figure, int layerNr); > > /** > * Gets the layer for a certain figure (first occurrence). The number > * returned is the number of the layer in which the figure is placed. > * > * @param figure figure to be queried for its layering place > * @return number of the layer in which the figure is placed and -1 if the > * figure could not be found. > * @see #sendToLayer > */ > public int getLayer(Figure figure); > > /** > * Gets the figure from a certain layer. > * > * @param layerNr number of the layer which figure should be returned > * @return figure from the layer specified, null, if the layer nr was outside > * the number of possible layer (0...(number of figures - 1)) > * @see #sendToLayer > */ > public Figure getFigureFromLayer(int layerNr); > > /**