001: /*
002: * This file is part of the Echo Web Application Framework (hereinafter "Echo").
003: * Copyright (C) 2002-2005 NextApp, Inc.
004: *
005: * Version: MPL 1.1/GPL 2.0/LGPL 2.1
006: *
007: * The contents of this file are subject to the Mozilla Public License Version
008: * 1.1 (the "License"); you may not use this file except in compliance with
009: * the License. You may obtain a copy of the License at
010: * http://www.mozilla.org/MPL/
011: *
012: * Software distributed under the License is distributed on an "AS IS" basis,
013: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
014: * for the specific language governing rights and limitations under the
015: * License.
016: *
017: * Alternatively, the contents of this file may be used under the terms of
018: * either the GNU General Public License Version 2 or later (the "GPL"), or
019: * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
020: * in which case the provisions of the GPL or the LGPL are applicable instead
021: * of those above. If you wish to allow use of your version of this file only
022: * under the terms of either the GPL or the LGPL, and not to allow others to
023: * use your version of this file under the terms of the MPL, indicate your
024: * decision by deleting the provisions above and replace them with the notice
025: * and other provisions required by the GPL or the LGPL. If you do not delete
026: * the provisions above, a recipient may use your version of this file under
027: * the terms of any one of the MPL, the GPL or the LGPL.
028: */
029:
030: package nextapp.echo2.testapp.interactive;
031:
032: import nextapp.echo2.app.Button;
033: import nextapp.echo2.app.ContentPane;
034: import nextapp.echo2.app.Extent;
035: import nextapp.echo2.app.Font;
036: import nextapp.echo2.app.Insets;
037: import nextapp.echo2.app.Label;
038: import nextapp.echo2.app.Column;
039: import nextapp.echo2.app.Row;
040: import nextapp.echo2.app.SplitPane;
041: import nextapp.echo2.app.WindowPane;
042: import nextapp.echo2.app.event.ActionEvent;
043: import nextapp.echo2.app.event.ActionListener;
044:
045: /**
046: * <code>ContentPane</code> which displays a welcome/instruction message to
047: * users when they initially visit the application.
048: */
049: public class WelcomePane extends ContentPane {
050:
051: /**
052: * Default constructor.
053: */
054: public WelcomePane() {
055: super ();
056: setStyleName("WelcomePane");
057: setRenderId("WelcomePane");
058:
059: Label label;
060:
061: WindowPane loginWindow = new WindowPane();
062: loginWindow
063: .setTitle("Welcome to the NextApp Echo2 Test Application");
064: loginWindow.setStyleName("WelcomePane");
065: loginWindow.setClosable(false);
066: add(loginWindow);
067:
068: SplitPane splitPane = new SplitPane(
069: SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP, new Extent(
070: 32));
071: loginWindow.add(splitPane);
072:
073: Row controlRow = new Row();
074: controlRow.setStyleName("ControlPane");
075: splitPane.add(controlRow);
076:
077: Button button = new Button("Continue", Styles.ICON_24_YES);
078: button.setRenderId("WelcomePaneEnter");
079: button.setId("EnterTestApplication");
080: button.setStyleName("ControlPane.Button");
081: button.addActionListener(new ActionListener() {
082: public void actionPerformed(ActionEvent e) {
083: InteractiveApp.getApp().displayTestPane();
084: }
085: });
086: controlRow.add(button);
087:
088: Column infoColumn = new Column();
089: infoColumn.setInsets(new Insets(20, 5));
090: infoColumn.setCellSpacing(new Extent(10));
091: splitPane.add(infoColumn);
092:
093: label = new Label(
094: "Please read the following before using the test application:");
095: label.setFont(new Font(null, Font.BOLD, null));
096: infoColumn.add(label);
097:
098: label = new Label(
099: "This application was built to interactively test components of Echo2 during development. "
100: + "It is also being (mis)used as a public demonstration of Echo2's capabilities. "
101: + "Note that if this is a development version of Echo, then some "
102: + "of the features and capabilities demonstrated in this application may not be complete.");
103: infoColumn.add(label);
104:
105: label = new Label(
106: "Note that you may watch the AJAX XML messages being sent between the client and server by "
107: + "enabling \"Debug Mode\". Debug Mode may be enabled "
108: + "by appending \"?debug\" to the end of the URL of this application (for example: "
109: + "\"http://demo.nextapp.com/InteractiveTest/ia?debug\"). "
110: + "Please be aware that Debug Mode will in most cases result in EXTREMELY SLOW PERFORMANCE. "
111: + "You may exit Debug Mode at any time by simply closing the Debug window.");
112: infoColumn.add(label);
113:
114: label = new Label(
115: "Please visit the Echo2 Home Page @ http://www.nextapp.com/products/echo2 for more information.");
116: infoColumn.add(label);
117:
118: Column column = new Column();
119: column.setRenderId("MainColumn");
120: column.setStyleName("WelcomePane.Column");
121: add(column);
122:
123: label = new Label(Styles.NEXTAPP_LOGO);
124: column.add(label);
125:
126: label = new Label(Styles.ECHO2_IMAGE);
127: column.add(label);
128:
129: label = new Label(Styles.INTERACTIVE_TEST_APPLICATION_IMAGE);
130: column.add(label);
131: }
132: }
|