16,16d15 < import CH.ifa.draw.util.*; 18,18d16 < import java.io.*; 33a32,32 > public class StandardLayouter extends SimpleLayouter { 34,46d31 < public class StandardLayouter implements Layouter { < < /** < * The Layoutable which should be laid out. < */ < private Layoutable myLayoutable; < < /** < * Insets to calculate a border < */ < private Insets myInsets; < < static final long serialVersionUID = 2928651014089117493L; 54a41,41 > this(null); 55,55d40 < setInsets(new Insets(0, 0, 0, 0)); 64a51,51 > super(newLayoutable); 65,66d50 < this(); < setLayoutable(newLayoutable); 76,93d60 < /** < * Get the figure upon which the layout strategy operates. < * < * @return associated figure which should be laid out < */ < public Layoutable getLayoutable() { < return myLayoutable; < } < < /** < * Set the figure upon which the layout strategy operates. < * < * @param newLayoutable Layoutable to be laid out < */ < public void setLayoutable(Layoutable newLayoutable) { < myLayoutable = newLayoutable; < } < 107,107c74,74 < FigureEnumeration enum = getLayoutable().figures(); --- > FigureEnumeration fe = getLayoutable().figures(); 107a75,75 > while (fe.hasNextFigure()) { 108,108d74 < while (enum.hasMoreElements()) { 109,109c76,76 < Figure currentFigure = enum.nextFigure(); --- > Figure currentFigure = fe.nextFigure(); 144,144c111,111 < FigureEnumeration enum = getLayoutable().figures(); --- > FigureEnumeration fe = getLayoutable().figures(); 144a112,112 > while (fe.hasNextFigure()) { 145,145d111 < while (enum.hasMoreElements()) { 146,146c113,113 < Figure currentFigure = enum.nextFigure(); --- > Figure currentFigure = fe.nextFigure(); 167,198d133 < < /** < * Reads the contained figures from StorableInput. < */ < public void read(StorableInput dr) throws IOException { < setLayoutable((Layoutable)dr.readStorable()); < } < < /** < * Writes the contained figures to the StorableOutput. < */ < public void write(StorableOutput dw) { < dw.writeStorable(getLayoutable()); < } < < /** < * Set the insets for spacing between the figure and its subfigures < * < * @param newInsets new spacing dimensions < */ < public void setInsets(Insets newInsets) { < myInsets = newInsets; < } < < /** < * Get the insets for spacing between the figure and its subfigures < * < * @return spacing dimensions < */ < public Insets getInsets() { < return myInsets; < }