1 package org.woehlke.computer.kurzweil.conwaysgameoflive.view.canvas.food;
2
3 import lombok.Getter;
4 import lombok.ToString;
5 import lombok.extern.log4j.Log4j2;
6 import org.woehlke.computer.kurzweil.conwaysgameoflive.view.ConwaysGameOfLiveTab;
7 import org.woehlke.computer.kurzweil.conwaysgameoflive.view.tabs.SubTabImpl;
8 import org.woehlke.computer.kurzweil.conwaysgameoflive.view.tabs.TabPanel;
9 import org.woehlke.computer.kurzweil.conwaysgameoflive.model.ConwaysGameOfLiveModel;
10
11 import java.io.Serializable;
12
13
14
15
16
17
18
19
20 @Log4j2
21 @Getter
22 @ToString(callSuper = true)
23 @Deprecated
24 public class FoodPerDayPanel extends SubTabImpl implements Serializable {
25
26 static final long serialVersionUID = 242L;
27
28 @ToString.Exclude
29 private final ConwaysGameOfLiveTab tab;
30 private final String foodPerDayBorderLabel;
31 private final FoodPerDayLabel foodPerDayLabel;
32 private final FoodPerDayTextField foodPerDayTextField;
33 private final FoodPerDayIncreaseButton foodPerDayIncreaseButton;
34 private final FoodPerDayDecreaseButton foodPerDayDecreaseButton;
35 private final ConwaysGameOfLiveModel tabModel;
36
37 public FoodPerDayPanel(ConwaysGameOfLiveTab tab) {
38 super(
39 tab.getComputerKurzweilProperties().getSimulatedevolution().getFood().getFoodPerDayLabel(),
40 tab.getComputerKurzweilProperties()
41 );
42 this.tab = tab;
43 this.tabModel = this.tab.getConwaysGameOfLiveModel();
44 this.foodPerDayLabel = new FoodPerDayLabel(this.tab);
45 this.foodPerDayTextField = new FoodPerDayTextField(this.tab);
46 this.foodPerDayIncreaseButton = new FoodPerDayIncreaseButton(this.tab);
47 this.foodPerDayDecreaseButton = new FoodPerDayDecreaseButton(this.tab);
48 this.foodPerDayBorderLabel =
49 tab.getComputerKurzweilProperties().getSimulatedevolution().getFood().getFoodPerDayLabel();
50
51
52 this.add(this.foodPerDayLabel);
53 this.add(this.foodPerDayTextField);
54 this.add(this.foodPerDayIncreaseButton);
55 this.add(this.foodPerDayDecreaseButton);
56 }
57
58 public void addActionListener(TabPanel myTabPanel) {
59 this.foodPerDayIncreaseButton.addActionListener(myTabPanel);
60 this.foodPerDayDecreaseButton.addActionListener(myTabPanel);
61 }
62
63 public void update() {
64
65
66 }
67 }