From ae61a76d48b0a3a2222442916c3857071d9bdd02 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 9 Oct 2014 16:03:46 +0200 Subject: [PATCH] Move sample tests in a separate file. --- DrawingWindow.java | 28 +--------------------------- Makefile | 7 +++++-- 2 files changed, 6 insertions(+), 29 deletions(-) diff --git a/DrawingWindow.java b/DrawingWindow.java index 3d35c96..ba3d3ed 100644 --- a/DrawingWindow.java +++ b/DrawingWindow.java @@ -28,7 +28,7 @@ import java.lang.reflect.*; * Exemple3.java * * @author Arnaud Giersch <arnaud.giersch@univ-fcomte.fr> - * @version Thu, 09 Oct 2014 15:27:09 +0200 + * @version Thu Oct 9 16:03:46 2014 +0200 */ public class DrawingWindow { @@ -490,30 +490,4 @@ public class DrawingWindow { public void keyTyped(KeyEvent e) { } } - - // Sample tests - public static void main(String[] args) { - DrawingWindow w = new DrawingWindow("Test!", 400, 400); - - w.setColor("green"); - for (int i = 0; i < 12; i++) { - int p = 10 * i + 10; - w.drawLine(p, 0, p, 175); - w.drawLine(p + i, 0, p + i, 175); - } - - w.setColor("black"); - for (int i = 0; i < 12; i++) { - int p = 10 * i + 10; - - w.drawCircle(p, 25, i); - w.fillCircle(p, 50, i); - - w.drawRect(p, 75, p + i, 75 + i); - w.fillRect(p, 100, p + i, 100 + i); - - w.drawTriangle(p, 125, p + i, 125 + i/2, p, 125 + i); - w.fillTriangle(p, 150, p + i, 150 + i/2, p, 150 + i); - } - } } diff --git a/Makefile b/Makefile index 71c49e3..e405622 100644 --- a/Makefile +++ b/Makefile @@ -10,15 +10,18 @@ EXAMPLES_CLASS = $(EXAMPLES:%.java=%.class) all: html/index.html $(MAKE) -f ../Makefile.generic $(SRC_CLASS) $(EXAMPLES_CLASS) + $(MAKE) -f ../Makefile.generic Test.class html/index.html: $(SRC) $(RM) -r html - javadoc -author -version -notree -nodeprecated -nohelp \ - -encoding utf-8 -docencoding utf-8 -charset utf-8 \ + javadoc -locale fr_FR -encoding utf-8 -docencoding utf-8 -charset utf-8 \ + -quiet -notree -nodeprecated -nohelp \ + -author -version -public \ -d html/ $(SRC) clean: $(RM) DrawingWindow*.class + $(RM) Test.class $(RM) $(EXAMPLES_CLASS) $(RM) -r html/ -- 2.20.1