package lectures.composite.design_pattern;
import util.annotations.WebDocuments;
import bus.uigen.ObjectEditor;
@WebDocuments({"Lectures/CompositeDesignPattern.pptx", "Lectures/CompositeDesignPattern.pdf", "Videos/CompositeDesignPattern.avi"})
public class ScalableShapeListCreator extends CompositeScalableNestedPairCreator {
public static ScalableShapeList createShapeList (int numShapes){
ScalableShapeList shapeList = new AScalableShapeList();
LeafShape curShape = innermost();
for (int curElementNum = 0; curElementNum < numShapes; curElementNum ++) {
shapeList.add(curShape);
curShape = toOuter(curShape);
}
return shapeList;
}
public static void main (String[] args) {
ObjectEditor.edit(createShapeList(3));
}
}