1 package org.catacomb.druid.dialog;
2
3 import org.catacomb.druid.gui.base.DruInfoPanel;
4 import org.catacomb.druid.gui.base.DruLabelPanel;
5 import org.catacomb.interlish.annotation.IOPoint;
6
7
8 public class MessageDialogController extends DialogController {
9
10 @IOPoint(xid="title")
11 public DruLabelPanel titleLabel;
12
13 @IOPoint(xid="info")
14 public DruInfoPanel infoPanel;
15
16
17
18 public void OK() {
19
20 hideDialog();
21 }
22
23
24
25 public void show(int[] xyin, String title, String msg) {
26 int[] xy = xyin;
27 checkInit();
28
29 if (xy == null) {
30 xy = new int[2];
31 xy[0] = 400;
32 xy[1] = 400;
33 }
34
35 titleLabel.setText("<html><b>" + title + "</b></html>");
36
37 infoPanel.showInfo(msg);
38 infoPanel.revalidate();
39
40 showAt(xy[0], xy[1]);
41
42 }
43
44 }