aboutsummaryrefslogtreecommitdiff
path: root/src/RotatingThread.java
blob: afe4a6ed94d6be8627b37873df3e449537562b19 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*    */ public class RotatingThread extends Thread
/*    */ {
/*    */   private boolean stop;
/*    */   private Graph3D graph;
/*    */   private String axies;
/*    */ 
/*    */   public RotatingThread(Graph3D graph, String axies)
/*    */   {
/* 14 */     this.graph = graph;
/* 15 */     this.axies = axies;
/* 16 */     this.stop = false;
/*    */   }
/*    */   public void interrupt() {
/* 19 */     super.interrupt();
/* 20 */     this.stop = true;
/*    */   }
/*    */   public void run() {
/* 23 */     boolean x = this.axies.contains("x");
/* 24 */     boolean y = this.axies.contains("y");
/* 25 */     boolean z = this.axies.contains("z");
/* 26 */     while (!this.stop)
/*    */     {
/* 28 */       if (x) {
/* 29 */         this.graph.setXRotation(this.graph.getXRotation() + 1.0D);
/*    */       }
/* 31 */       if (y) {
/* 32 */         this.graph.setYRotation(this.graph.getYRotation() + 1.0D);
/*    */       }
/* 34 */       if (z) {
/* 35 */         this.graph.setZRotation(this.graph.getZRotation() + 1.0D);
/*    */       }
/* 37 */       this.graph.repaint();
/*    */       try {
/* 39 */         Thread.sleep(33L);
/*    */       }
/*    */       catch (Exception localException)
/*    */       {
/*    */       }
/*    */     }
/*    */   }
/*    */ }

/* Location:           Modulus.jar
 * Qualified Name:     RotatingThread
 * JD-Core Version:    0.6.2
 */