1 package org.catacomb.druid.dialog;
2
3 import org.catacomb.druid.gui.base.DruInfoPanel;
4 import org.catacomb.druid.gui.base.DruScrollingInfoPanel;
5 import org.catacomb.interlish.annotation.IOPoint;
6 import org.catacomb.interlish.report.Logger;
7 import org.catacomb.interlish.report.Message;
8
9
10 public class ProgressLogDialogController extends DialogController
11 implements Logger {
12
13
14 @IOPoint(xid="headInfo")
15 public DruInfoPanel headInfoPanel;
16
17 @IOPoint(xid="logInfo")
18 public DruScrollingInfoPanel logInfoPanel;
19
20
21
22
23
24 public void close() {
25
26 hideDialog();
27 }
28
29
30 public void show() {
31 show(null);
32 }
33
34
35 public void show(int[] xyin) {
36 int[] xy = xyin;
37 checkInit();
38
39 if (xy == null) {
40 xy = new int[2];
41 xy[0] = 400;
42 xy[1] = 400;
43 }
44
45 showModalAt(xy[0], xy[1]);
46 }
47
48
49 public void log(String s) {
50 logInfoPanel.showInfo(s);
51 }
52
53
54 public void log(Message m) {
55 logInfoPanel.showInfo(m.getSummary());
56 }
57
58
59 public void optionalIncrementLog(int ifr, String string) {
60 String txt = "" + ifr + " " + string;
61 logInfoPanel.showInfo(txt);
62 }
63
64
65 public void init(String string) {
66 headInfoPanel.showInfo(string);
67
68 showNonModalAt(400, 400);
69 }
70
71
72 public void end() {
73 hideDialog();
74 }
75
76 }