1 package org.woehlke.computer.kurzweil.tabs.cca.config;
2
3 import org.woehlke.computer.kurzweil.tabs.cca.control.CyclicCellularAutomatonController;
4 import org.woehlke.computer.kurzweil.tabs.cca.model.CyclicCellularAutomatonLattice;
5 import org.woehlke.computer.kurzweil.tabs.cca.view.CyclicCellularAutomatonFrame;
6 import org.woehlke.computer.kurzweil.tabs.cca.view.CyclicCellularAutomatonCanvas;
7 import org.woehlke.computer.kurzweil.tabs.cca.view.PanelButtons;
8 import org.woehlke.computer.kurzweil.tabs.cca.view.PanelSubtitle;
9
10 public class ObjectRegistry {
11
12 private volatile CyclicCellularAutomatonController controller;
13 private volatile CyclicCellularAutomatonCanvas canvas;
14 private volatile CyclicCellularAutomatonLattice lattice;
15 private volatile CyclicCellularAutomatonFrame frame;
16 private volatile Config config;
17 private volatile ColorScheme colorScheme;
18 private volatile PanelButtons panelButtons;
19 private volatile PanelSubtitle subtitle;
20
21 public ObjectRegistry() {
22 this.config = new Config();
23 this.colorScheme = new ColorScheme();
24 this.lattice = new CyclicCellularAutomatonLattice(this);
25 this.canvas = new CyclicCellularAutomatonCanvas(this);
26 this.controller = new CyclicCellularAutomatonController(this);
27 this.panelButtons = new PanelButtons(this);
28 this.subtitle = new PanelSubtitle(this);
29 }
30
31 public CyclicCellularAutomatonController getController() {
32 return controller;
33 }
34
35 public void setController(CyclicCellularAutomatonController controller) {
36 this.controller = controller;
37 }
38
39 public CyclicCellularAutomatonCanvas getCanvas() {
40 return canvas;
41 }
42
43 public void setCanvas(CyclicCellularAutomatonCanvas canvas) {
44 this.canvas = canvas;
45 }
46
47 public CyclicCellularAutomatonLattice getLattice() {
48 return lattice;
49 }
50
51 public void setLattice(CyclicCellularAutomatonLattice lattice) {
52 this.lattice = lattice;
53 }
54
55 public CyclicCellularAutomatonFrame getFrame() {
56 return frame;
57 }
58
59 public void setFrame(CyclicCellularAutomatonFrame frame) {
60 this.frame = frame;
61 }
62
63 public ColorScheme getColorScheme() {
64 return colorScheme;
65 }
66
67 public void setColorScheme(ColorScheme colorScheme) {
68 this.colorScheme = colorScheme;
69 }
70
71 public PanelButtons getPanelButtons() {
72 return panelButtons;
73 }
74
75 public void setPanelButtons(PanelButtons panelButtons) {
76 this.panelButtons = panelButtons;
77 }
78
79 public PanelSubtitle getSubtitle() {
80 return subtitle;
81 }
82
83 public void setSubtitle(PanelSubtitle subtitle) {
84 this.subtitle = subtitle;
85 }
86
87 public Config getConfig() {
88 return config;
89 }
90
91 public void setConfig(Config config) {
92 this.config = config;
93 }
94 }