import transformax.*;
import java.awt.Color;
public class Applet09 extends GApplet
{
public void start()
{
GRoundedStrip strip1, strip2, strip3;
strip1 = new GRoundedStrip(5,1,Color.red,Color.yellow);
strip3 = new GRoundedStrip(20,.2,Color.black,Color.white);
strip2 = new GRoundedStrip(0,1,Color.blue,Color.cyan);
strip3.transform(new Translation(-10,0));
strip2.transform(new Translation(5,0));
scene.add(strip1);
strip1.add(strip2);
strip2.add(strip3);
strip1.setClickTransform(new Rotation(10));
strip2.setClickTransform(new Rotation(10));
strip3.setClickTransform(new Translation(1,0));
strip1.transform(new Rotation(90));
strip2.transform(new Rotation(90));
LocusPoint lp;
lp = new LocusPoint(20,0,viewport, Color.blue);
strip3.add(lp);
strip1.setName("st1");
strip2.setName("st2");
strip3.setName("st3");
scene.render();
String[] script =
{
"st1 leftClick 10 100",
"st3 rightClick",
"st1 rightClick 8 100",
"st3 rightClick",
"st1 leftClick 8 100",
"st3 rightClick",
"st1 rightClick 8 100",
"st3 rightClick",
"st3 rightClick",
"st2 leftClick 9 100",
"st1 rightClick 16 100",
"st2 leftClick 10 100"
};
DemoButton button = new DemoButton();
button.use(script);
panel.add(button, 10, 5);
panel.add(new GLabel("demo"),30,5);
}
}
back to instructions