/Users/lyon/j4p/src/bookExamples/ch26Graphics/carl/logPolar/Logic.java
|
1 package bookExamples.ch26Graphics.carl.logPolar;
2
3 import gui.ClosableJFrame;
4 import bookExamples.ch26Graphics.carl.logPolar.ColorArray;
5
6 /**
7 * Created by
8 * User: lyon
9 * Date: May 16, 2003
10 * Time: 10:19:31 AM
11 *
12 */
13 public class Logic {
14 private javax.swing.JPanel panDisplay;
15 private PointArray lppArray;
16 private ColorArray cArray;
17 private int shuffleBundle = 1;
18 private int rings = 9;
19 private int rays = 24;
20 private boolean radially = true;
21 private int iOffset = 0;
22 private boolean timerON = false;
23 protected java.awt.geom.Point2D.Float p2 =
24 new java.awt.geom.Point2D.Float();
25 protected java.awt.geom.Point2D.Float p1 =
26 new java.awt.geom.Point2D.Float();
27 protected java.awt.geom.Ellipse2D e2d =
28 new java.awt.geom.Ellipse2D.Float();
29 protected java.awt.Color color1;
30 protected java.awt.Color color2;
31 private final ClosableJFrame closableJFrame;
32
33 public Logic(String title) {
34 closableJFrame = new ClosableJFrame(title);
35 }
36
37 public void cycleColor() {
38 setIOffset(getIOffset() + 1);
39 getPanDisplay().repaint();
40 }
41
42 public javax.swing.JPanel getPanDisplay() {
43 return panDisplay;
44 }
45
46 public void setPanDisplay(javax.swing.JPanel panDisplay) {
47 this.panDisplay = panDisplay;
48 }
49
50 public PointArray getLppArray() {
51 return lppArray;
52 }
53
54 public void setLppArray(PointArray lppArray) {
55 this.lppArray = lppArray;
56 }
57
58 public ColorArray getCArray() {
59 return cArray;
60 }
61
62 public void setCArray(ColorArray cArray) {
63 this.cArray = cArray;
64 }
65
66 public int getShuffleBundle() {
67 return shuffleBundle;
68 }
69
70 public void setShuffleBundle(int shuffleBundle) {
71 this.shuffleBundle = shuffleBundle;
72 }
73
74 public int getRings() {
75 return rings;
76 }
77
78 public void setRings(int rings) {
79 this.rings = rings;
80 }
81
82 public int getRays() {
83 return rays;
84 }
85
86 public void setRays(int rays) {
87 this.rays = rays;
88 }
89
90 public boolean isRadially() {
91 return radially;
92 }
93
94 public void setRadially(boolean radially) {
95 this.radially = radially;
96 }
97
98 public int getIOffset() {
99 return iOffset;
100 }
101
102 public void setIOffset(int iOffset) {
103 this.iOffset = iOffset;
104 }
105
106 public boolean isTimerON() {
107 return timerON;
108 }
109
110 public void setTimerON(boolean timerON) {
111 this.timerON = timerON;
112 }
113
114 public ClosableJFrame getClosableJFrame() {
115 return closableJFrame;
116 }
117
118 }
119