source: tags/gsdl-2_70u-distribution/gsdl/src/java/org/nzdl/gsdl/GsdlCollageApplet/Display.java@ 11745

Last change on this file since 11745 was 11745, checked in by (none), 18 years ago

This commit was manufactured by cvs2svn to create tag
'gsdl-2_70u-distribution'.

  • Property svn:keywords set to Author Date Id Revision
File size: 915 bytes
Line 
1package org.nzdl.gsdl.GsdlCollageApplet;
2
3import java.applet.*;
4import java.awt.*;
5import java.awt.image.*;
6import java.awt.geom.*;
7import java.util.*;
8
9/**
10 * @author Katrina Edgar */
11public class Display extends Thread {
12
13 GsdlCollageApplet app_ = null;
14
15 public Display(GsdlCollageApplet app) {
16 super("Display");
17 app_ = app;
18
19 }
20
21
22 /** Runs display thread by repeatedly calling the next frame,
23 * waiting for a specified delay period between calls */
24 public void run() {
25 try {
26
27 System.err.println("Started display thread.");
28
29 Thread curr_thread = Thread.currentThread();
30
31 while (curr_thread == this) {
32 app_.repaint();
33 // can't make it zero or it hogs the whole processor
34 Thread.sleep(100);
35 curr_thread = Thread.currentThread();
36 }
37
38 System.err.println("Stopped display thread.");
39
40 } catch (Exception e) {
41 e.printStackTrace();
42 }
43 }
44}
Note: See TracBrowser for help on using the repository browser.