001: /*
002: * ChainBuilder ESB
003: * Visual Enterprise Integration
004: *
005: * Copyright (C) 2008 Bostech Corporation
006: *
007: * This program is free software; you can redistribute it and/or modify
008: * it under the terms of the GNU General Public License as published by
009: * the Free Software Foundation; either version 2 of the License, or
010: * (at your option) any later version.
011: *
012: * This program is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * General Public License for more details.
016: *
017: * You should have received a copy of the GNU General Public License
018: * along with this program; if not, write to the Free Software
019: * Foundation, Inc.,59 Temple Place, Suite 330, Boston, MA 02111-1307
020: * USA
021: *
022: *
023: * $Id$
024: */
025:
026: package com.bostechcorp.cbesb.console.client.about;
027:
028: import com.bostechcorp.cbesb.console.client.Admin;
029: import com.bostechcorp.cbesb.console.i18n.ConsoleMessages;
030: import com.google.gwt.core.client.GWT;
031: import com.google.gwt.user.client.ui.SourcesTabEvents;
032: import com.google.gwt.user.client.ui.TabListener;
033: import com.google.gwt.user.client.ui.TabPanel;
034:
035: /**
036: * @author rui.hou
037: *
038: */
039: public class AdminConsoleAbout extends Admin {
040:
041: /**
042: *
043: */
044: public AdminConsoleAbout() {
045: createWidget();
046: }
047:
048: protected void createWidget() {
049: final TabPanel aboutPanel = new TabPanel();
050: final VersionPanel versionPanel = new VersionPanel();
051: final AdminConsoleLicensePanel adminConsoleLicensePanel = new AdminConsoleLicensePanel();
052: final SupportPanel supportPanel = new SupportPanel();
053: initWidget(aboutPanel);
054: aboutPanel.setSize("100%", "100%");
055: aboutPanel.add(versionPanel, ((ConsoleMessages) GWT
056: .create(ConsoleMessages.class)).Version());
057: aboutPanel.add(adminConsoleLicensePanel, ((ConsoleMessages) GWT
058: .create(ConsoleMessages.class)).License());
059: aboutPanel.add(supportPanel, ((ConsoleMessages) GWT
060: .create(ConsoleMessages.class)).Support());
061: versionPanel.onShow();
062: aboutPanel.selectTab(0);
063: aboutPanel.addTabListener(new TabListener() {
064: public boolean onBeforeTabSelected(SourcesTabEvents sender,
065: int tabIndex) {
066: return true;
067: }
068:
069: public void onTabSelected(SourcesTabEvents sender,
070: int tabIndex) {
071: if (tabIndex == 0)
072: versionPanel.onShow();
073: else if (tabIndex == 1)
074: adminConsoleLicensePanel.onShow();
075: else
076: supportPanel.onShow();
077: }
078: });
079: }
080:
081: /* (non-Javadoc)
082: * @see com.bostechcorp.cbesb.console.client.Admin#onHide()
083: */
084: public void onHide() {
085: // TODO Auto-generated method stub
086:
087: }
088:
089: /* (non-Javadoc)
090: * @see com.bostechcorp.cbesb.console.client.Admin#onShow()
091: */
092: public void onShow() {
093: // TODO Auto-generated method stub
094:
095: }
096:
097: /* (non-Javadoc)
098: * @see com.bostechcorp.cbesb.console.client.Admin#refresh()
099: */
100: public void refresh() {
101: // TODO Auto-generated method stub
102:
103: }
104:
105: }
|