diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-11-25 22:18:58 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-11-25 22:18:58 +0000 |
commit | 7a5fe8ce23ac50450b804cf0183c773565ae7cef (patch) | |
tree | 220a38a6627619d1386897d42757a140b9de448f /java/gjt/test/SimpleBargaugeTest.java | |
parent | 87b0987cad99cf45cd5d9e03cd1cefbaaec4ef2a (diff) | |
download | ATCD-ACE-4_4.tar.gz |
This commit was manufactured by cvs2svn to create branch 'ACE-4_4'.ACE-4_4
Diffstat (limited to 'java/gjt/test/SimpleBargaugeTest.java')
-rw-r--r-- | java/gjt/test/SimpleBargaugeTest.java | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/java/gjt/test/SimpleBargaugeTest.java b/java/gjt/test/SimpleBargaugeTest.java deleted file mode 100644 index 57eb464f4b1..00000000000 --- a/java/gjt/test/SimpleBargaugeTest.java +++ /dev/null @@ -1,61 +0,0 @@ -package gjt.test; - -import java.awt.*; -import gjt.Bargauge; - -/** - * A lone Barguage which animates. This unit test is meant to - * illustrate that a Bargauge can cope with having its - * orientation chanaged from horizontal to vertical or - * vice-versa. This test is best run in appletviewer, so that - * the window may be resized such that the Bargauge changes its - * orientation.<p> - * - * <em> - * Warning: An AWT bug causes this test to be a gluttenous - * consumer of resources (especially under Win95). A mouse down - * will halt the animation thread along with its consumption of - * resources.<p> - * </em> - * - * @version 1.0, April 25, 1996 - * @author David Geary - * @see gjt.test.UnitTest - * @see gjt.Bargauge - */ -public class SimpleBargaugeTest extends UnitTest { - public String title() { - return "Simple Bargauge Test"; - } - public Panel centerPanel() { - return new SimpleBargaugeTestPanel(); - } -} - -class SimpleBargaugeTestPanel extends Panel implements Runnable { - private Bargauge gauge = new Bargauge(Color.blue); - private boolean running = true; - private Thread t; - - public SimpleBargaugeTestPanel() { - setLayout(new BorderLayout()); - add("Center", gauge); - - t = new Thread(this); - t.start(); - } - public void run() { - while(true) { - try { Thread.currentThread().sleep(500,0); } - catch(InterruptedException e) { } - - gauge.setFillPercent(Math.random() * 100); - gauge.fill(); - } - } - public boolean mouseDown(Event event, int x, int y) { - if(running) { t.suspend(); running = false; } - else { t.resume (); running = true; } - return true; - } -} |