16d15 < import CH.ifa.draw.util.*; 18d16 < import java.io.*; 34,46c32 < 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; --- > public class StandardLayouter extends SimpleLayouter { 55c41 < setInsets(new Insets(0, 0, 0, 0)); --- > this(null); 65,66c51 < this(); < setLayoutable(newLayoutable); --- > super(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,109c74,76 < FigureEnumeration enum = getLayoutable().figures(); < while (enum.hasMoreElements()) { < Figure currentFigure = enum.nextFigure(); --- > FigureEnumeration fe = getLayoutable().figures(); > while (fe.hasNextFigure()) { > Figure currentFigure = fe.nextFigure(); 144,146c111,113 < FigureEnumeration enum = getLayoutable().figures(); < while (enum.hasMoreElements()) { < Figure currentFigure = enum.nextFigure(); --- > FigureEnumeration fe = getLayoutable().figures(); > while (fe.hasNextFigure()) { > 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; < }