1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
package ca.spaz.cron.summary; |
5 |
|
|
6 |
|
import java.awt.*; |
7 |
|
|
8 |
|
import javax.swing.JComponent; |
9 |
|
|
10 |
|
import ca.spaz.cron.database.NutrientInfo; |
11 |
|
|
12 |
|
public class NutrientDisplay extends JComponent { |
13 |
0 |
double amount = 0; |
14 |
|
private NutrientInfo info; |
15 |
|
|
16 |
0 |
public NutrientDisplay(NutrientInfo info) { |
17 |
0 |
this.info = info; |
18 |
0 |
} |
19 |
|
|
20 |
|
public double getAmount() { |
21 |
0 |
return amount; |
22 |
|
} |
23 |
|
|
24 |
|
public void setAmount(double amount) { |
25 |
0 |
this.amount = amount; |
26 |
0 |
} |
27 |
|
|
28 |
|
public NutrientInfo getInfo() { |
29 |
0 |
return info; |
30 |
|
} |
31 |
|
|
32 |
|
public void setInfo(NutrientInfo info) { |
33 |
0 |
this.info = info; |
34 |
0 |
} |
35 |
|
|
36 |
|
public Dimension getMinimumSize() { |
37 |
0 |
return new Dimension(100, 20); |
38 |
|
} |
39 |
|
|
40 |
|
public void paint(Graphics g) { |
41 |
|
|
42 |
|
|
43 |
0 |
} |
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
} |