01: /*
02: * ChainBuilder ESB
03: * Visual Enterprise Integration
04: *
05: * Copyright (C) 2008 Bostech Corporation
06: *
07: * This program is free software; you can redistribute it and/or modify
08: * it under the terms of the GNU General Public License as published by
09: * the Free Software Foundation; either version 2 of the License, or
10: * (at your option) any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public License
18: * along with this program; if not, write to the Free Software
19: * Foundation, Inc.,59 Temple Place, Suite 330, Boston, MA 02111-1307
20: * USA
21: *
22: *
23: * $Id$
24: */
25:
26: package com.bostechcorp.cbesb.console.client.about;
27:
28: import com.bostechcorp.cbesb.console.i18n.ConsoleMessages;
29: import com.google.gwt.core.client.GWT;
30: import com.google.gwt.user.client.ui.ClickListener;
31: import com.google.gwt.user.client.ui.DialogBox;
32: import com.google.gwt.user.client.ui.HasHorizontalAlignment;
33: import com.google.gwt.user.client.ui.HasVerticalAlignment;
34: import com.google.gwt.user.client.ui.Label;
35: import com.google.gwt.user.client.ui.PushButton;
36: import com.google.gwt.user.client.ui.VerticalPanel;
37: import com.google.gwt.user.client.ui.Widget;
38:
39: /**
40: * @author rui.hou
41: *
42: */
43: public class LicenseAgreementDialog extends DialogBox {
44:
45: /**
46: *
47: */
48: private VerticalPanel agreementpanel = new VerticalPanel();
49: private Label agreementLabel = new Label();
50: private PushButton okButton = new PushButton(((ConsoleMessages) GWT
51: .create(ConsoleMessages.class)).OK());
52:
53: public LicenseAgreementDialog(String agreementContent) {
54: super (false, true);
55: setWidget(agreementpanel);
56: initContent(agreementpanel, agreementContent);
57: show();
58: center();
59: }
60:
61: private void initContent(VerticalPanel agreementpanel,
62: String agreementContent) {
63: agreementLabel.setText(agreementContent);
64: agreementpanel.add(agreementLabel);
65: agreementpanel.add(okButton);
66: agreementpanel.setCellHorizontalAlignment(okButton,
67: HasHorizontalAlignment.ALIGN_CENTER);
68: okButton.addClickListener(new ClickListener() {
69: public void onClick(Widget sender) {
70: hide();
71: }
72: });
73: }
74:
75: }
|