/* Copyright 2001 Michael R. Wick */ package Scopes; import java.awt.*; import java.awt.event.*; import java.applet.*; import Views.*; import Factories.*; import Strategies.*; import Controls.*; public class Composite extends Applet{ //Construct the applet Kaleidoscope kal; KaleidoscopeView kalView1, kalView2; KaleidoscopeControl kalControl; public Composite() { setLayout( new FlowLayout() ); CompositeShapeMutationStrategy s = new CompositeShapeMutationStrategy(200); s.add( new SpinShapeMutationStrategy(200) ); s.add( new ExplodeShapeMutationStrategy(200) ); kal = new Kaleidoscope(new GeneralShapeFactory(200) , s ); kalView1 = new FlipKaleidoscopeView(kal, 200); kalControl = new KaleidoscopeControl(kal); add(kalView1); add(kalControl); setBackground(Color.lightGray); } }