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 * An alternative option for editing a Consumed food
13 * item amount, by popping up a dialog for editing.
14 *
15 * Currently unused.
16 *
17 * @author davidson
18 */
19 public class EditServingDialog extends JDialog {
20
21 private ServingEditor info;
22
23 public EditServingDialog(Serving cf) {
24 super(CRONOMETER.getInstance());
25 this.info = new ServingEditor(CRONOMETER.getInstance());
26 this.info.setServing(cf);
27 this.setTitle("Edit Consumed Food");
28 this.getContentPane().add(info);
29 this.pack();
30 this.setLocationRelativeTo(CRONOMETER.getInstance());
31 this.setModal(true);
32 this.setVisible(true);
33 }
34
35 }