* Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
...
...
@@ -29,22 +29,24 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
*/
importjava.awt.*;
importjava.awt.event.*;
importjava.applet.*;
/**
* An interactive test of the Graphics.drawArc and Graphics.fillArc
* routines. Can be run either as a standalone application by
* typing "java ArcTest" or as an applet in the AppletViewer.
*/
@SuppressWarnings("serial")
publicclassArcTestextendsApplet{
ArcControlscontrols;// The controls for marking and filling arcs
ArcCanvascanvas;// The drawing area to display arcs
@Override
publicvoidinit(){
setLayout(newBorderLayout());
canvas=newArcCanvas();
...
...
@@ -52,19 +54,23 @@ public class ArcTest extends Applet {
add("South",controls=newArcControls(canvas));
}
@Override
publicvoiddestroy(){
remove(controls);
remove(canvas);
}
@Override
publicvoidstart(){
controls.setEnabled(true);
}
@Override
publicvoidstop(){
controls.setEnabled(false);
}
@Override
publicvoidprocessEvent(AWTEvente){
if(e.getID()==Event.WINDOW_DESTROY){
System.exit(0);
...
...
@@ -80,20 +86,28 @@ public class ArcTest extends Applet {
f.add("Center",arcTest);
f.setSize(300,300);
f.show();
f.setVisible(true);
}
@Override
publicStringgetAppletInfo(){
return"An interactive test of the Graphics.drawArc and \nGraphics.fillArc routines. Can be run \neither as a standalone application by typing 'java ArcTest' \nor as an applet in the AppletViewer.";
return"An interactive test of the Graphics.drawArc and \nGraphics."
+"fillArc routines. Can be run \neither as a standalone "
+"application by typing 'java ArcTest' \nor as an applet in "
return"Title: CLSFractal 1.1f, 27 Mar 1995 \nAuthor: Jim Graham \nA (not yet) Context Sensitive L-System production rule. \nThis class encapsulates a production rule for a Context Sensitive\n L-System \n(pred, succ, lContext, rContext). The matches() method, however, does not \n(yet) verify the lContext and rContext parts of the rule.";
return"Title: CLSFractal 1.1f, 27 Mar 1995 \nAuthor: Jim Graham \nA "
+"(not yet) Context Sensitive L-System production rule. \n"
+"This class encapsulates a production rule for a Context "