1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package net.sf.glxdesktop.gui.runcmd;
18
19 import net.sf.glxdesktop.gui.Messages;
20 import net.sf.glxdesktop.gui.glade.I18GladeTemplate;
21 import net.sf.glxdesktop.gui.glade.LoadGlade;
22 import net.sf.glxdesktop.gui.glade.LoadGladeException;
23
24 import org.gnu.glade.LibGlade;
25 import org.gnu.gtk.Button;
26 import org.gnu.gtk.Expander;
27 import org.gnu.gtk.Label;
28 import org.gnu.gtk.ProgressBar;
29 import org.gnu.gtk.TextView;
30 import org.gnu.gtk.Window;
31
32 public abstract class RunCmdProgress {
33
34 private static final String GLADE_FILE = "glade/runcmd.glade";
35
36 protected LibGlade glade;
37
38 protected Window window;
39
40 protected ProgressBar progressBar;
41
42 protected Button buttonClose;
43
44 protected Label labelMessage;
45
46 protected TextView textViewCmdOutput;
47
48 protected TextView textViewCmdError;
49
50 protected Expander expanderCmdOutput;
51
52 protected Expander expanderCmdError;
53
54 private static final String[] GLX_LABELS = {
55 "label_cmd_input", "label_cmd_error" };
56
57 public void initialize() throws LoadGladeException {
58
59 LoadGlade loadGlade = new LoadGlade(GLADE_FILE, this);
60 glade = loadGlade.getGlade();
61
62 I18GladeTemplate i18GladeTemplate = new I18GladeTemplate(glade,
63 GLX_LABELS, Messages.RESOURCE_BUNDLE, "i18nGladeRunCmdProgress");
64 i18GladeTemplate.localizeTemplate();
65
66 window = (Window) glade.getWidget("window_runcmd");
67 progressBar = (ProgressBar) glade.getWidget("progressbar");
68 buttonClose = (Button) glade.getWidget("button_close");
69 labelMessage = (Label) glade.getWidget("label_message");
70 textViewCmdOutput = (TextView) glade.getWidget("textview_output");
71 textViewCmdError = (TextView) glade.getWidget("textview_error");
72 expanderCmdOutput = (Expander) glade.getWidget("expander_output");
73 expanderCmdError = (Expander) glade.getWidget("expander_error");
74 }
75
76 }