| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
package ca.spaz.cron.ui; |
| 5 |
|
|
| 6 |
|
import javax.swing.JDialog; |
| 7 |
|
|
| 8 |
|
import ca.spaz.cron.CRONOMETER; |
| 9 |
|
import ca.spaz.cron.database.Serving; |
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
public class EditServingDialog extends JDialog { |
| 20 |
|
|
| 21 |
|
private ServingEditor info; |
| 22 |
|
|
| 23 |
|
public EditServingDialog(Serving cf) { |
| 24 |
0 |
super(CRONOMETER.getInstance()); |
| 25 |
0 |
this.info = new ServingEditor(CRONOMETER.getInstance()); |
| 26 |
0 |
this.info.setServing(cf); |
| 27 |
0 |
this.setTitle("Edit Consumed Food"); |
| 28 |
0 |
this.getContentPane().add(info); |
| 29 |
0 |
this.pack(); |
| 30 |
0 |
this.setLocationRelativeTo(CRONOMETER.getInstance()); |
| 31 |
0 |
this.setModal(true); |
| 32 |
0 |
this.setVisible(true); |
| 33 |
0 |
} |
| 34 |
|
|
| 35 |
|
} |