]> source.dussan.org Git - vaadin-framework.git/commitdiff
#4500 move Reservr outside Vaadin core
authorHenri Sara <henri.sara@itmill.com>
Fri, 9 Apr 2010 10:08:45 +0000 (10:08 +0000)
committerHenri Sara <henri.sara@itmill.com>
Fri, 9 Apr 2010 10:08:45 +0000 (10:08 +0000)
svn changeset:12426/svn branch:6.3

17 files changed:
WebContent/VAADIN/readme.txt
WebContent/VAADIN/themes/liferay/styles.css
WebContent/VAADIN/themes/reservr/bmw.jpg [deleted file]
WebContent/VAADIN/themes/reservr/favicon.ico [deleted file]
WebContent/VAADIN/themes/reservr/reservr.jpg [deleted file]
WebContent/VAADIN/themes/reservr/styles.css [deleted file]
WebContent/WEB-INF/liferay-display.xml
WebContent/WEB-INF/liferay-portlet.xml
WebContent/WEB-INF/portlet.xml
WebContent/WEB-INF/web.xml
build/build.xml
build/package/WebContent/WEB-INF/web.xml
build/package/eclipse-classpath
tests/src/com/vaadin/tests/QueryContainerDemo.java [deleted file]
tests/src/com/vaadin/tests/TestBench.java
tests/src/com/vaadin/tests/TestComponentsAndLayouts.java [deleted file]
tests/src/com/vaadin/tests/TestIFrames.java

index 672862a35c909263a80c8e989f9fc43085ae2fa3..ee64a234232310d0f91a7da94ca1a9386a5ca493 100644 (file)
@@ -28,7 +28,7 @@ Vaadin Development
 ---------------------------
 When developing the Vaadin Library itself, change to "build" directory and
 run "ant widgetsets" to compile all widgetsets or "ant widgetset-default",
-"ant-widgetset-reserver", or "ant widgetset-colorpicker" to compile individual
+"ant-widgetset-sampler", or "ant widgetset-colorpicker" to compile individual
 widgetsets. You must have GWT installed under build/gwt.
 
 See http://dev.vaadin.com/wiki/DevDocs/StartingDevelopment for instructions for
index 51a32d1fee6ed394f796a1b5aaa705e3d7aec6a3..e60cc98ace5423e9fdfaab858ca0367938ea074b 100644 (file)
@@ -30,8 +30,3 @@ input[type="text"].v-filterselect-input {
        padding: 3px 0px 0px 4px;
 }\r
        
-.simplereserver div.v-datefield-entrycalendar-hours {\r
-       height: 200px;\r
-       overflow: auto;\r
-}\r
-
diff --git a/WebContent/VAADIN/themes/reservr/bmw.jpg b/WebContent/VAADIN/themes/reservr/bmw.jpg
deleted file mode 100644 (file)
index 5d91713..0000000
Binary files a/WebContent/VAADIN/themes/reservr/bmw.jpg and /dev/null differ
diff --git a/WebContent/VAADIN/themes/reservr/favicon.ico b/WebContent/VAADIN/themes/reservr/favicon.ico
deleted file mode 100644 (file)
index e58158c..0000000
Binary files a/WebContent/VAADIN/themes/reservr/favicon.ico and /dev/null differ
diff --git a/WebContent/VAADIN/themes/reservr/reservr.jpg b/WebContent/VAADIN/themes/reservr/reservr.jpg
deleted file mode 100644 (file)
index 5fc956a..0000000
Binary files a/WebContent/VAADIN/themes/reservr/reservr.jpg and /dev/null differ
diff --git a/WebContent/VAADIN/themes/reservr/styles.css b/WebContent/VAADIN/themes/reservr/styles.css
deleted file mode 100644 (file)
index 380df00..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-@import url(../runo/styles.css);
-
-/* Reservr styles */\r
-.v-app-ReservationApplication {\r
-       background-color: #E9ECED;\r
-       background-image: url(bmw.jpg);\r
-       background-repeat: no-repeat;\r
-       background-position: top right;\r
-}\r
-\r
-.v-app-ReservationApplication .v-label-logo {
-       font-family: "Trebuchet MS", geneva, helvetica, arial, tahoma, verdana, sans-serif;
-       padding-left: 13px;
-       padding-bottom: 10px;
-       padding-top: 10px;
-       color: #F14C1A;\r
-       font-size: 22px;\r
-       letter-spacing: -0.03em;\r
-}
-.v-app-ReservationApplication .v-label-slogan {
-       color: black;
-       padding-left: 15px;
-       padding-bottom: 10px;
-       font-style: italic;     
-}\r
-\r
-.v-caption {\r
-       color: #F14C1A;\r
-       font-size: 16px;\r
-}
-\r
-\r
-.v-label-arrow {\r
-       line-height: 160px;\r
-       font-family: Times New Roman;\r
-       color: #F14C1A;\r
-       font-size: 65px;\r
-       margin: 0 20px 0 12px;\r
-}\r
-\r
-.v-button-important-link {\r
-       border: 0px;\r
-       text-align: left;\r
-       text-decoration: none;\r
-       background: none;\r
-       font-weight: bold;\r
-}\r
-\r
-.v-app-ReservationApplication .v-button-selected-link {\r
-       border: 0px;\r
-       text-align: left;\r
-       text-decoration: none;\r
-       background: #5daee8;\r
-       font-weight: bold;\r
-       color: #fff;\r
-}\r
index 50bed9c7d56ff533dc7c34323d18992c25eec504..0e88c0e8620a6ad08f522e8521534293f9f02d25 100644 (file)
@@ -4,7 +4,6 @@
 <display>
         <category name="Vaadin">
                 <portlet id="PortletDemoPortlet" />
-                <portlet id="SimpleReserverPortlet" />
                 <portlet id="SelectDemoPortlet" />
                 <portlet id="TableDemoPortlet" />
                 <portlet id="FilterSelectPortlet" />
index cff3366a41500e2efcea83913df06a4a1e76afb7..f3c18e57d0dff71a31fde8129124eca8d7ebf11b 100644 (file)
@@ -7,11 +7,6 @@
                 <instanceable>true</instanceable>       
                 <ajaxable>false</ajaxable>
         </portlet>
-        <portlet>
-                <portlet-name>SimpleReserverPortlet</portlet-name>
-                <instanceable>true</instanceable>       
-                <ajaxable>false</ajaxable>
-        </portlet>
         <portlet>
                 <portlet-name>SelectDemoPortlet</portlet-name>
                 <instanceable>true</instanceable>       
index 6cd7f70a48c3346278c5071947c6d22ab623d48d..265c3b38694d9acbf074b1fb7949703c77197304 100644 (file)
@@ -14,7 +14,7 @@
 
                <init-param>
                        <name>widgetset</name>
-                       <value>com.vaadin.demo.reservation.gwt.ReservationWidgetSet</value>
+                       <value>com.vaadin.demo.sampler.gwt.SamplerWidgetSet</value>
                </init-param>
                <supports>
                        <mime-type>text/html</mime-type>
                        <role-name>user</role-name>
                </security-role-ref>
        </portlet>
-       <portlet>
-               <portlet-name>SimpleReserverPortlet</portlet-name>
-               <display-name>Vaadin SimpleReserver</display-name>
-               <portlet-class>com.vaadin.terminal.gwt.server.ApplicationPortlet</portlet-class>
-               <init-param>
-                       <name>application</name>
-                       <value>SimpleReserver</value>
-               </init-param>
-               <init-param>
-                       <name>style</name>
-                       <value>height:400px</value>
-               </init-param>
-               <init-param>
-                       <name>widgetset</name>
-                       <value>com.vaadin.demo.reservation.gwt.ReservationWidgetSet</value>
-               </init-param>
-               <supports>
-                       <mime-type>text/html</mime-type>
-                       <portlet-mode>view</portlet-mode>
-                       <portlet-mode>edit</portlet-mode>
-                       <portlet-mode>help</portlet-mode>
-               </supports>
-               <portlet-info>
-                       <title>SimpleReserver</title>
-                       <short-title>SimpleReserver</short-title>
-               </portlet-info>
-
-               <security-role-ref>
-                       <role-name>administrator</role-name>
-               </security-role-ref>
-               <security-role-ref>
-                       <role-name>guest</role-name>
-               </security-role-ref>
-               <security-role-ref>
-                       <role-name>power-user</role-name>
-               </security-role-ref>
-               <security-role-ref>
-                       <role-name>user</role-name>
-               </security-role-ref>
-       </portlet>
        <portlet>
                <portlet-name>FeatureBrowserPortlet</portlet-name>
                <display-name>Vaadin FeatureBrowser</display-name>
@@ -94,7 +54,7 @@
                </init-param>
                <init-param>
                        <name>widgetset</name>
-                       <value>com.vaadin.demo.reservation.gwt.ReservationWidgetSet</value>
+                       <value>com.vaadin.demo.sampler.gwt.SamplerWidgetSet</value>
                </init-param>
                <supports>
                        <mime-type>text/html</mime-type>
 
                <init-param>
                        <name>widgetset</name>
-                       <value>com.vaadin.demo.reservation.gwt.ReservationWidgetSet</value>
+                       <value>com.vaadin.demo.sampler.gwt.SamplerWidgetSet</value>
                </init-param>
                <supports>
                        <mime-type>text/html</mime-type>
                </init-param>
                <init-param>
                        <name>widgetset</name>
-                       <value>com.vaadin.demo.reservation.gwt.ReservationWidgetSet</value>
+                       <value>com.vaadin.demo.sampler.gwt.SamplerWidgetSet</value>
                </init-param>
                <supports>
                        <mime-type>text/html</mime-type>
index 096828c99f75d590e2fc524995389b611e0ab4d0..dfdedf5dce9e1832931ccbb7c654cf7655bdc609 100644 (file)
                </init-param>\r
        </servlet>      \r
 \r
-       <servlet>\r
-               <servlet-name>Reservr</servlet-name>\r
-               <servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>\r
-               <init-param>\r
-                       <param-name>application</param-name>\r
-                       <param-value>com.vaadin.demo.reservation.ReservationApplication</param-value>\r
-               </init-param>\r
-               <init-param>\r
-                       <param-name>widgetset</param-name>\r
-                       <param-value>com.vaadin.demo.reservation.gwt.ReservationWidgetSet</param-value>\r
-               </init-param>\r
-       </servlet>\r
-\r
-       <servlet>\r
-               <servlet-name>SimpleReserver</servlet-name>\r
-               <servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>\r
-               <init-param>\r
-                       <param-name>application</param-name>\r
-                       <param-value>com.vaadin.demo.reservation.simple.SimpleReserver</param-value>\r
-               </init-param>\r
-               <init-param>\r
-                       <param-name>widgetset</param-name>\r
-                       <param-value>com.vaadin.demo.reservation.gwt.ReservationWidgetSet</param-value>\r
-               </init-param>\r
-       </servlet>\r
-\r
-       <servlet>\r
-               <servlet-name>CalendarDemo</servlet-name>\r
-               <servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>\r
-               <init-param>\r
-                       <param-name>application</param-name>\r
-                       <param-value>com.vaadin.demo.reservation.CalendarDemo</param-value>\r
-               </init-param>\r
-               <init-param>\r
-                       <param-name>widgetset</param-name>\r
-                       <param-value>com.vaadin.demo.reservation.gwt.ReservationWidgetSet</param-value>\r
-               </init-param>\r
-       </servlet>\r
-\r
        <servlet>\r
                <servlet-name>CustomLayoutDemo</servlet-name>\r
                <servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>\r
                </init-param>\r
        </servlet>\r
 \r
-       <servlet>\r
-               <servlet-name>QueryContainerDemo</servlet-name>\r
-               <servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>\r
-               <init-param>\r
-                       <param-name>application</param-name>\r
-                       <param-value>com.vaadin.tests.QueryContainerDemo</param-value>\r
-               </init-param>\r
-       </servlet>\r
-\r
        <servlet>\r
                <servlet-name>TreeFilesystemContainer</servlet-name>\r
                <servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>\r
                <url-pattern>/t/*</url-pattern>\r
        </servlet-mapping>
 
-       <servlet-mapping>\r
-               <servlet-name>Reservr</servlet-name>\r
-               <url-pattern>/Reservr/*</url-pattern>\r
-       </servlet-mapping>\r
-\r
-       <servlet-mapping>\r
-               <servlet-name>SimpleReserver</servlet-name>\r
-               <url-pattern>/SimpleReserver/*</url-pattern>\r
-               <!-- portlet style=height:400px -->\r
-       </servlet-mapping>\r
-\r
-       <servlet-mapping>\r
-               <servlet-name>CalendarDemo</servlet-name>\r
-               <url-pattern>/CalendarDemo/*</url-pattern>\r
-       </servlet-mapping>\r
-\r
        <servlet-mapping>\r
                <servlet-name>CustomLayoutDemo</servlet-name>\r
                <url-pattern>/CustomLayoutDemo/*</url-pattern>\r
                <url-pattern>/UpgradingSample/*</url-pattern>\r
        </servlet-mapping>\r
 \r
-       <servlet-mapping>\r
-               <servlet-name>QueryContainerDemo</servlet-name>\r
-               <url-pattern>/QueryContainerDemo/*</url-pattern>\r
-       </servlet-mapping>\r
-\r
        <servlet-mapping>\r
                <servlet-name>TreeFilesystemContainer</servlet-name>\r
                <url-pattern>/TreeFilesystemContainer/*</url-pattern>\r
index dd79f3ff8f33fcc172c7c6ca432c9c0a7ff152a2..0f57c5e31513e7f732580d70ec137bf3794f60fb 100644 (file)
        </antcall>
     </target>
 
-    <target name="compile-widgetset-reserver" unless="compile.only.default-widgetset">
-        <condition property="googlemaps-jar" value="${output-dir}/WebContent/demo/lib/gwt-maps/gwt-maps.jar">
-            <available file="${output-dir}/WebContent/demo/lib/gwt-maps/gwt-maps.jar" />
-        </condition>
-        <condition property="googlemaps-jar" value="lib/gwt-maps/gwt-maps.jar">
-            <available file="lib/reservr/gwt-maps.jar" />
-        </condition>
-        <java classname="com.google.gwt.dev.Compiler" failonerror="yes" fork="yes" maxmemory="512m">
-            <arg value="-war" />
-            <arg value="${widgetsets-output-dir}" />
-            <arg value="com.vaadin.demo.reservation.gwt.ReservationWidgetSet" />
-            <arg value="-style" />
-            <arg value="OBF" />
-            <jvmarg value="-Xss8M"/>
-            <jvmarg value="-Djava.awt.headless=true"/>
-            <classpath>
-                <pathelement location="${lib-gwt-user}" />
-                <pathelement location="${lib-gwt-dev}" />
-                <pathelement location="${result-path}/src/core" />
-                <pathelement location="${result-path}/src/demo" />
-                <!-- demo jars -->
-                <pathelement location="${googlemaps-jar}" />
-                <!-- demo widgetset sources -->
-                <pathelement path="${output-dir}/WebContent/WEB-INF/src" />
-                <pathelement location="${result-path}/classes" />
-            </classpath>
-        </java>
-        <antcall target="remove-widgetset-gwt-tmp"/>
-        <echo>Compiled ReservationWidgetSet</echo>
-    </target>
-
         <target name="compile-widgetset-sampler" unless="compile.only.default-widgetset">
                <antcall target="compile-widgetset">
                        <param name="widgetset" value="com.vaadin.demo.sampler.gwt.SamplerWidgetSet"/>
     <target name="widgetset-default" depends="init-nonpackage, init, compile-widgetset-generator, compile-widgetset-default"/>
     <target name="widgetset-portal-default" depends="init-nonpackage, init, compile-widgetset-generator, compile-widgetset-portal-default"/>
     <target name="widgetset-sampler" depends="init-nonpackage, init, compile-widgetset-generator, compile-widgetset-sampler"/>
-    <target name="widgetset-reserver" depends="init-nonpackage, init, compile-widgetset-generator, compile-widgetset-reserver"/>
     <target name="widgetset-colorpicker" depends="init-nonpackage, init, compile-widgetset-generator, compile-widgetset-colorpicker"/>
 
     <!-- ================================================================== -->
index dc18d792fba4379843f72deb28dd5f02630516e9..7048ffd64e0fdad0e6b3d90255b8b4fb06279c00 100644 (file)
                </init-param>
        </servlet>
 
-       <!--  Reservr demo application -->
-       <servlet>
-               <servlet-name>Reservr</servlet-name>
-               <servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>
-               <init-param>
-                       <param-name>application</param-name>
-                       <param-value>com.vaadin.demo.reservation.ReservationApplication</param-value>
-               </init-param>
-               <init-param>
-                       <param-name>widgetset</param-name>
-                       <param-value>com.vaadin.demo.reservation.gwt.ReservationWidgetSet</param-value>
-               </init-param>
-       </servlet>
-
-       <!-- Version of the Reservr to be run  as a portlet -->
-       <servlet>
-               <servlet-name>SimpleReserver</servlet-name>
-               <servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>
-               <init-param>
-                       <param-name>application</param-name>
-                       <param-value>com.vaadin.demo.reservation.simple.SimpleReserver</param-value>
-               </init-param>
-               <init-param>
-                       <param-name>widgetset</param-name>
-                       <param-value>com.vaadin.demo.reservation.gwt.ReservationWidgetSet</param-value>
-               </init-param>
-       </servlet>
-
-       <!-- Calendar demo application (shown in Windowed demos) -->
-       <servlet>
-               <servlet-name>CalendarDemo</servlet-name>
-               <servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>
-               <init-param>
-                       <param-name>application</param-name>
-                       <param-value>com.vaadin.demo.reservation.CalendarDemo</param-value>
-               </init-param>
-               <init-param>
-                       <param-name>widgetset</param-name>
-                       <param-value>com.vaadin.demo.reservation.gwt.ReservationWidgetSet</param-value>
-               </init-param>
-       </servlet>
-
        <!-- Hello world demo application -->
        <servlet>
                <servlet-name>HelloWorld</servlet-name>
                <servlet-name>VaadinApplicationRunner</servlet-name>
                <url-pattern>/run/*</url-pattern>
        </servlet-mapping>
-       <servlet-mapping>
-               <servlet-name>Reservr</servlet-name>
-               <url-pattern>/Reservr/*</url-pattern>
-       </servlet-mapping>
-       <servlet-mapping>
-               <servlet-name>SimpleReserver</servlet-name>
-               <url-pattern>/SimpleReserver/*</url-pattern>
-       </servlet-mapping>
-       <servlet-mapping>
-               <servlet-name>CalendarDemo</servlet-name>
-               <url-pattern>/CalendarDemo/*</url-pattern>
-       </servlet-mapping>
        <servlet-mapping>
                <servlet-name>FeatureBrowser</servlet-name>
                <url-pattern>/FeatureBrowser/*</url-pattern>
index f8420353c8bb51ad3f0f335b9e5833b3bace8c63..1f70f30d0e3dbde661b825e322ba9f44a6464ba7 100644 (file)
@@ -5,7 +5,6 @@
        <classpathentry kind="lib" path="WebContent/WEB-INF/lib/vaadin-@version@.jar"/>
        <classpathentry kind="lib" path="gwt/gwt-user.jar" />
        <classpathentry kind="lib" path="gwt/gwt-servlet.jar" />
-       <classpathentry kind="lib" path="WebContent/demo/lib/gwt-maps/gwt-maps.jar" />
        <classpathentry kind="lib" path="WebContent/demo/lib/jetty/jetty-6.1.7.jar"/>
        <classpathentry kind="lib" path="WebContent/demo/lib/jetty/jetty-util-6.1.7.jar"/>
        <classpathentry kind="lib" path="WebContent/demo/lib/jetty/servlet-api-2.5-6.1.7.jar"/>
diff --git a/tests/src/com/vaadin/tests/QueryContainerDemo.java b/tests/src/com/vaadin/tests/QueryContainerDemo.java
deleted file mode 100644 (file)
index abd9801..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-/* 
-@ITMillApache2LicenseForJavaFiles@
- */
-
-package com.vaadin.tests;
-
-import java.sql.SQLException;
-
-import com.vaadin.data.util.QueryContainer;
-import com.vaadin.demo.util.SampleDatabase;
-import com.vaadin.event.Action;
-import com.vaadin.ui.Label;
-import com.vaadin.ui.Select;
-import com.vaadin.ui.Table;
-import com.vaadin.ui.Tree;
-import com.vaadin.ui.Window;
-
-/**
- * This example shows how Table, Select and Tree UI components can use
- * Containers. QueryContainer is used to bind SQL table rows into Vaadin UI
- * components. Table has few example actions added. Also embedding XHTML through
- * Label components is used. Demonstrates: how to create
- * <code>com.vaadin.data.Container</code> and set it as datasource to UI
- * components <code>com.vaadin.ui.Component.Tree</code>, how to receive
- * ExpandEvent and implement <code>com.vaadin.ui.Tree.ExpandListener</code>, how
- * to use <code>com.vaadin.event.Action</code>.
- * 
- * @author IT Mill Ltd.
- * @since 4.0.0
- * 
- */
-public class QueryContainerDemo extends com.vaadin.Application implements
-        Action.Handler {
-
-    private static final String ACTION_DESCRIPTION = "Try right mouse button to initiate "
-            + "actions menu.<br />Note: on Opera you use meta key "
-            + "and left mouse button.";
-
-    private static final String TABLE_CAPTION = SampleDatabase.ROWCOUNT
-            + " dynamically loaded rows from example SQL table";
-
-    // Table component where SQL rows are attached (using QueryContainer)
-    private final Table table = new Table();
-
-    private final Label tableLastAction = new Label(
-            "No action selected for table.");
-
-    // Select component where SQL rows are attached (using QueryContainer)
-    private final Select select = new Select();
-
-    // Tree component that uses select as datasource
-    private final Tree tree = new Tree();
-
-    private final Label treeLastAction = new Label(
-            "No action selected for tree.");
-
-    // Database provided with sample data
-    private SampleDatabase sampleDatabase;
-
-    // Example Actions for table
-    private final Action ACTION1 = new Action("Upload");
-
-    private final Action ACTION2 = new Action("Download");
-
-    private final Action ACTION3 = new Action("Show history");
-
-    private final Action[] actions = new Action[] { ACTION1, ACTION2, ACTION3 };
-
-    /**
-     * Initialize Application. Demo components are added to main window.
-     */
-    @Override
-    public void init() {
-        final Window main = new Window("QueryContainer demo");
-        setMainWindow(main);
-
-        // Main window contains heading, table, select and tree
-        main
-                .addComponent(new Label(
-                        "<h2>QueryContainer demo</h2>"
-                                + "<b>Rows are loaded from the server as they are needed.<br />"
-                                + "Try scrolling the table to see it in action.</b><br />"
-                                + ACTION_DESCRIPTION, Label.CONTENT_XHTML));
-        main.addComponent(table);
-        main.addComponent(tableLastAction);
-        main.addComponent(new Label("<hr />", Label.CONTENT_XHTML));
-        main.addComponent(select);
-        main.addComponent(new Label("<hr />", Label.CONTENT_XHTML));
-        main.addComponent(tree);
-        main.addComponent(treeLastAction);
-
-        // create demo database
-        sampleDatabase = new SampleDatabase();
-
-        // initialize demo components
-        initTable();
-        initSelect();
-        initTree();
-    }
-
-    /**
-     * Populates table component with all rows from employee table.
-     * 
-     */
-    private void initTable() {
-        // init table
-        table.setCaption(TABLE_CAPTION);
-        table.setPageLength(10);
-        table.setSelectable(true);
-        table.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX);
-        table.setColumnCollapsingAllowed(true);
-        table.setColumnReorderingAllowed(true);
-        table.setSelectable(true);
-        // this class handles table actions (see handleActions method below)
-        table.addActionHandler(this);
-        table.setDescription(ACTION_DESCRIPTION);
-
-        // populate Vaadin table component with test SQL table rows
-        try {
-            final QueryContainer qc = new QueryContainer(
-                    "SELECT * FROM employee", sampleDatabase.getConnection());
-            table.setContainerDataSource(qc);
-        } catch (final SQLException e) {
-            e.printStackTrace();
-        }
-        // define which columns should be visible on Table component
-        table.setVisibleColumns(new Object[] { "FIRSTNAME", "LASTNAME",
-                "TITLE", "UNIT" });
-        table.setItemCaptionPropertyId("ID");
-    }
-
-    /**
-     * Populates select component with distinct unit values from employee table.
-     * 
-     */
-    private void initSelect() {
-        // init select
-        select.setCaption("All distinct units from employee table.");
-        select.setItemCaptionPropertyId("UNIT");
-
-        // populate Vaadin select component with test SQL table rows
-        try {
-            final QueryContainer qc = new QueryContainer(
-                    "SELECT DISTINCT UNIT FROM employee", sampleDatabase
-                            .getConnection());
-            select.setContainerDataSource(qc);
-        } catch (final SQLException e) {
-            e.printStackTrace();
-        }
-    }
-
-    /**
-     * Populates tree component using select component as data source for root
-     * nodes, child nodes are queried from database. Implementation is done for
-     * example purposes only.
-     * 
-     */
-    private void initTree() {
-        // init tree
-        tree.setCaption("All distinct units from employee table.");
-        tree.setItemCaptionPropertyId("UNIT");
-        tree.setSelectable(true);
-        // this class handles tree actions (see handleActions method below)
-        tree.addActionHandler(this);
-        tree.setDescription("Try right mouse button to initiate "
-                + "actions menu. Note: on Opera you use meta key "
-                + "and left mouse button.");
-
-        // Populate Vaadin Tree using select component as data source
-        tree.setContainerDataSource(select.getContainerDataSource());
-    }
-
-    /**
-     * Return example actions
-     */
-    public Action[] getActions(Object target, Object sender) {
-        return actions;
-    }
-
-    /**
-     * Executed by right mouse button on table or tree component.
-     */
-    public void handleAction(Action action, Object sender, Object target) {
-        if (sender == table) {
-            tableLastAction.setValue("Last action clicked was '"
-                    + action.getCaption() + "' on item " + target);
-        } else if (sender == tree) {
-            treeLastAction.setValue("Last action clicked was '"
-                    + action.getCaption() + "' on item " + target);
-        }
-    }
-
-}
index be3471c02d08d8ba6de7a31cf86853cd2172183a..1e71c6fa9194a85540649aaed810bcfdf03050bc 100644 (file)
@@ -44,9 +44,8 @@ public class TestBench extends com.vaadin.Application implements
 
     // Add here packages which are used for finding testable classes
     String[] testablePackages = { "com.vaadin.tests", "com.vaadin.demo",
-            "com.vaadin.demo.colorpicker", "com.vaadin.demo.reservation",
-            "com.vaadin.demo.features", "com.vaadin.tests.tickets",
-            "com.vaadin.tests.book" };
+            "com.vaadin.demo.colorpicker", "com.vaadin.demo.features",
+            "com.vaadin.tests.tickets", "com.vaadin.tests.book" };
 
     HierarchicalContainer testables = new HierarchicalContainer();
 
diff --git a/tests/src/com/vaadin/tests/TestComponentsAndLayouts.java b/tests/src/com/vaadin/tests/TestComponentsAndLayouts.java
deleted file mode 100644 (file)
index ba9fbe8..0000000
+++ /dev/null
@@ -1,470 +0,0 @@
-/* 
-@ITMillApache2LicenseForJavaFiles@
- */
-
-package com.vaadin.tests;
-
-import java.io.File;
-import java.sql.SQLException;
-
-import com.vaadin.Application;
-import com.vaadin.data.Container;
-import com.vaadin.data.util.FilesystemContainer;
-import com.vaadin.data.util.QueryContainer;
-import com.vaadin.demo.util.SampleDatabase;
-import com.vaadin.demo.util.SampleDirectory;
-import com.vaadin.event.Action;
-import com.vaadin.terminal.ClassResource;
-import com.vaadin.terminal.ErrorMessage;
-import com.vaadin.terminal.ExternalResource;
-import com.vaadin.terminal.UserError;
-import com.vaadin.ui.AbstractComponent;
-import com.vaadin.ui.Accordion;
-import com.vaadin.ui.Button;
-import com.vaadin.ui.CheckBox;
-import com.vaadin.ui.Component;
-import com.vaadin.ui.CustomComponent;
-import com.vaadin.ui.DateField;
-import com.vaadin.ui.Embedded;
-import com.vaadin.ui.GridLayout;
-import com.vaadin.ui.Label;
-import com.vaadin.ui.Layout;
-import com.vaadin.ui.Link;
-import com.vaadin.ui.NativeSelect;
-import com.vaadin.ui.OptionGroup;
-import com.vaadin.ui.OrderedLayout;
-import com.vaadin.ui.Panel;
-import com.vaadin.ui.RichTextArea;
-import com.vaadin.ui.Select;
-import com.vaadin.ui.Slider;
-import com.vaadin.ui.SplitPanel;
-import com.vaadin.ui.TabSheet;
-import com.vaadin.ui.Table;
-import com.vaadin.ui.TextField;
-import com.vaadin.ui.Tree;
-import com.vaadin.ui.TwinColSelect;
-import com.vaadin.ui.Upload;
-import com.vaadin.ui.VerticalLayout;
-import com.vaadin.ui.Window;
-import com.vaadin.ui.Component.Event;
-import com.vaadin.ui.Component.Listener;
-
-/**
- * Search for "TWEAK these" keyword and configure Custom/AbstractComponents to
- * various states and see how they work inside different Layouts.
- * 
- */
-public class TestComponentsAndLayouts extends Application implements Listener,
-        Action.Handler {
-
-    // event listener feedback (see console)
-    Label eventListenerFeedback = new Label(
-            "See console for event listener log.");
-    int eventCount = 0;
-
-    Window window;
-
-    // component counter
-    int count = 0;
-
-    SampleDatabase sampleDatabase;
-
-    // Example Actions for table
-    private final Action ACTION1 = new Action("Upload");
-    private final Action ACTION2 = new Action("Download");
-    private final Action ACTION3 = new Action("Show history");
-    private final Action[] actions = new Action[] { ACTION1, ACTION2, ACTION3 };
-
-    @Override
-    public void init() {
-        sampleDatabase = new SampleDatabase();
-        createNewView();
-    }
-
-    public void createNewView() {
-        final Window main = new Window("Main window");
-        setMainWindow(main);
-
-        // By default push all containers inside main window
-        Layout target = main.getLayout();
-
-        main
-                .addComponent(new Label(
-                        "Each Layout and their contained components should "
-                                + "have icon, caption, description, user error defined. "
-                                + "Eeach layout should contain similar components. "
-                                + "All components are in immmediate mode. See source how to tweak this test."));
-        main.addComponent(eventListenerFeedback);
-
-        // //////////////////////////////////////////////////////////////////////
-        // ////
-        if (false) {
-            window = new Window("Components inside Window (TEST: Window)");
-
-            if (false) {
-                // push every container and their components inside window
-                target = window.getLayout();
-            } else {
-                // window is just one container to be tested
-                populateLayout(window.getLayout());
-            }
-            getMainWindow().addWindow(window);
-        }
-
-        // //////////////////////////////////////////////////////////////////////
-        // ////
-        if (false) {
-            target
-                    .addComponent(new Label(
-                            "<hr /><h1>Components inside horizontal OrderedLayout</h3>",
-                            Label.CONTENT_XHTML));
-            final OrderedLayout ol = new OrderedLayout(
-                    OrderedLayout.ORIENTATION_HORIZONTAL);
-            populateLayout(ol);
-            target.addComponent(ol);
-        }
-
-        // //////////////////////////////////////////////////////////////////////
-        // ////
-        if (false) {
-            target
-                    .addComponent(new Label(
-                            "<br/><br/><br/><hr /><h1>Components inside vertical OrderedLayout</h3>",
-                            Label.CONTENT_XHTML));
-            final OrderedLayout ol2 = new OrderedLayout(
-                    OrderedLayout.ORIENTATION_VERTICAL);
-            populateLayout(ol2);
-            target.addComponent(ol2);
-        }
-
-        // //////////////////////////////////////////////////////////////////////
-        // ////
-        if (false) {
-            target.addComponent(new Label(
-                    "<hr /><h1>Components inside TabSheet</h3>",
-                    Label.CONTENT_XHTML));
-            final TabSheet tabsheet = new TabSheet();
-            final OrderedLayout tab1 = new OrderedLayout();
-            tab1.addComponent(new Label("try tab2"));
-            final OrderedLayout tab2 = new OrderedLayout();
-            populateLayout(tab2);
-            tabsheet.addTab(tab1, "TabSheet tab1", new ClassResource("m.gif",
-                    this));
-            tabsheet.addTab(tab2, "TabSheet tab2", new ClassResource("m.gif",
-                    this));
-            target.addComponent(tabsheet);
-            // test(tabsheet);
-            // test(tab1);
-            // test(tab2);
-            // test(expandLayout);
-        }
-
-        // //////////////////////////////////////////////////////////////////////
-        // ////
-        if (true) {
-            target.addComponent(new Label(
-                    "<hr /><h1>Components inside Accordion</h3>",
-                    Label.CONTENT_XHTML));
-            final Accordion accordion = new Accordion();
-            accordion.setHeight(500);
-            final OrderedLayout acc1 = new OrderedLayout();
-            acc1.addComponent(new Label("try acc2"));
-            final OrderedLayout acc2 = new OrderedLayout();
-            populateLayout(acc2);
-            accordion.addTab(acc1, "Accordion acc1", new ClassResource("m.gif",
-                    this));
-            accordion.addTab(acc2, "Accordion acc2", new ClassResource("m.gif",
-                    this));
-            target.addComponent(accordion);
-            // test(accordion);
-            // test(acc1);
-            // test(acc2);
-            // test(expandLayout);
-        }
-
-        // //////////////////////////////////////////////////////////////////////
-        // ////
-        if (false) {
-            target.addComponent(new Label(
-                    "<hr /><h1>Components inside GridLayout</h3>",
-                    Label.CONTENT_XHTML));
-            final GridLayout gridLayout = new GridLayout(4, 100);
-            populateLayout(gridLayout);
-            target.addComponent(gridLayout);
-            // test(gridLayout);
-        }
-
-        // //////////////////////////////////////////////////////////////////////
-        // ////
-        if (false) {
-            target.addComponent(new Label(
-                    "<hr /><h1>Components inside Panel</h3>",
-                    Label.CONTENT_XHTML));
-            final Panel panel = new Panel("Panel");
-            populateLayout(panel.getLayout());
-            target.addComponent(panel);
-        }
-
-        // //////////////////////////////////////////////////////////////////////
-        // ////
-        if (false) {
-            target
-                    .addComponent(new Label(
-                            "<hr /><h1>Components inside horizontal SplitPanel (splitpanel is under 250px height ExpandLayout)</h3>",
-                            Label.CONTENT_XHTML));
-            final VerticalLayout sp2l = new VerticalLayout();
-            sp2l.setHeight(250, SplitPanel.UNITS_PIXELS);
-            final SplitPanel sp2 = new SplitPanel(
-                    SplitPanel.ORIENTATION_HORIZONTAL);
-            sp2l.addComponent(sp2);
-            final VerticalLayout sp2first = new VerticalLayout();
-            final VerticalLayout sp2second = new VerticalLayout();
-            sp2.setFirstComponent(sp2first);
-            populateLayout(sp2first);
-            populateLayout(sp2second);
-            sp2.setSecondComponent(sp2second);
-            target.addComponent(sp2l);
-        }
-
-    }
-
-    void populateLayout(Layout layout) {
-        final Button button = new Button("Button " + count++);
-        test(layout, button);
-
-        final DateField df = new DateField("DateField " + count++);
-        test(layout, df);
-
-        final CheckBox cb = new CheckBox("Checkbox " + count++);
-        test(layout, cb);
-
-        final ClassResource flashResource = new ClassResource(
-                "vaadin_spin.swf", this);
-        final Embedded emb = new Embedded("Embedded " + count++, flashResource);
-        emb.setType(Embedded.TYPE_OBJECT);
-        emb.setMimeType("application/x-shockwave-flash");
-        emb.setWidth("250px");
-        emb.setHeight("100px");
-        test(layout, emb);
-
-        final Panel panel = new Panel("Panel " + count++);
-        test(layout, panel);
-
-        final Label label = new Label("Label " + count++);
-        test(layout, label);
-
-        final Link link = new Link("Link " + count++, new ExternalResource(
-                "www.vaadin.com"));
-        test(layout, link);
-
-        final NativeSelect nativeSelect = new NativeSelect("NativeSelect "
-                + count++);
-        nativeSelect.setContainerDataSource(getContainer());
-        test(layout, nativeSelect);
-
-        final OptionGroup optionGroup = new OptionGroup("OptionGroup "
-                + count++);
-        optionGroup.setContainerDataSource(getSmallContainer());
-        optionGroup.setItemCaptionPropertyId("UNIT");
-        test(layout, optionGroup);
-
-        // final ProgressIndicator pi = new ProgressIndicator();
-        // pi.setCaption("ProgressIndicator");
-        // test(layout, pi);
-
-        final RichTextArea rta = new RichTextArea();
-        test(layout, rta);
-
-        final Select select = new Select("Select " + count++);
-        select.setContainerDataSource(getSmallContainer());
-        select.setItemCaptionPropertyId("UNIT");
-        test(layout, select);
-
-        final Slider slider = new Slider("Slider " + count++);
-        test(layout, slider);
-
-        final Table table = new Table("Table " + count++);
-        table.setPageLength(10);
-        table.setSelectable(true);
-        table.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX);
-        table.setColumnCollapsingAllowed(true);
-        table.setColumnReorderingAllowed(true);
-        table.setSelectable(true);
-        table.addActionHandler(this);
-        table.setContainerDataSource(getContainer());
-        table.setVisibleColumns(new Object[] { "FIRSTNAME", "LASTNAME",
-                "TITLE", "UNIT" });
-        table.setItemCaptionPropertyId("ID");
-        test(layout, table);
-
-        final TabSheet tabsheet = new TabSheet();
-        final VerticalLayout tab1 = new VerticalLayout();
-        tab1.addComponent(new Label("tab1 " + count++));
-        final VerticalLayout tab2 = new VerticalLayout();
-        tab2.addComponent(new Label("tab2 " + count++));
-        tabsheet.addTab(tab1, "Default (not configured) TabSheet tab1",
-                new ClassResource("m.gif", this));
-        tabsheet.addTab(tab2, "Configured TabSheet tab2", new ClassResource(
-                "m.gif", this));
-        test(layout, tabsheet);
-
-        final Accordion accordion = new Accordion();
-        final VerticalLayout acc1 = new VerticalLayout();
-        acc1.addComponent(new Label("acc1 " + count++));
-        final VerticalLayout acc2 = new VerticalLayout();
-        acc2.addComponent(new Label("acc2 " + count++));
-        accordion.addTab(acc1, "Default (not configured) Accordion acc1",
-                new ClassResource("m.gif", this));
-        accordion.addTab(acc2, "Configured Accordion acc2", new ClassResource(
-                "m.gif", this));
-        test(layout, accordion);
-
-        final TextField tf = new TextField("Textfield " + count++);
-        test(layout, tf);
-        // do not configure acc1
-        // test(acc1);
-        test(acc2);
-
-        final Tree tree = new Tree("Tree " + count++);
-        final File sampleDir = SampleDirectory.getDirectory(this);
-        final FilesystemContainer fsc = new FilesystemContainer(sampleDir, true);
-        tree.setContainerDataSource(fsc);
-        test(layout, tree);
-
-        final TwinColSelect twinColSelect = new TwinColSelect("TwinColSelect "
-                + count++);
-        twinColSelect.setContainerDataSource(getSmallContainer());
-        twinColSelect.setItemCaptionPropertyId("UNIT");
-        test(layout, twinColSelect);
-
-        final Upload upload = new Upload("Upload (non-functional)", null);
-        test(layout, upload);
-
-        // Custom components
-        layout.addComponent(new Label("<B>Below are few custom components</B>",
-                Label.CONTENT_XHTML));
-        final TestForUpload tfu = new TestForUpload();
-        layout.addComponent(tfu);
-        layout.addComponent(new Label("<br/><b>----------<br/></p>",
-                Label.CONTENT_XHTML));
-        test(tfu);
-
-        // DISABLED
-        // TableSelectTest tst = new TableSelectTest();
-        // layout.addComponent(tst);
-        // test(tst);
-        // layout.addComponent(new Label("<HR />", Label.CONTENT_XHTML));
-
-    }
-
-    Container getContainer() {
-        // populate container with test SQL table rows
-        try {
-            return new QueryContainer("SELECT * FROM employee", sampleDatabase
-                    .getConnection());
-        } catch (final SQLException e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    Container getSmallContainer() {
-        // populate container with test SQL table rows
-        try {
-            return new QueryContainer(
-                    "SELECT DISTINCT UNIT AS UNIT FROM employee",
-                    sampleDatabase.getConnection());
-        } catch (final SQLException e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    // common component configuration
-    void setComponentProperties(Component c) {
-        // TWEAK these
-        // c.setEnabled(false);
-        // c.setVisible(false);
-        // c.setStyleName("testStyleName");
-        // c.setReadOnly(true);
-
-        // try to add listener
-        try {
-            c.addListener(this);
-        } catch (final Exception e) {
-            System.err.println("Could not add listener for component " + c
-                    + ", count was " + count);
-        }
-    }
-
-    /**
-     * Stresses component by configuring it
-     * 
-     * @param c
-     */
-    void test(AbstractComponent c) {
-        // configure common component properties
-        // setComponentProperties(c);
-
-        // AbstractComponent specific configuration
-        final ClassResource res = new ClassResource("m.gif", this);
-        final ErrorMessage errorMsg = new UserError("User error " + c);
-        if ((c.getCaption() == null) || (c.getCaption().length() <= 0)) {
-            c.setCaption("Caption " + c);
-        }
-
-        // TWEAK these
-        // c.setComponentError(errorMsg);
-        // c.setIcon(res);
-        // c.setImmediate(true);
-        // c.addStyleName("addedTestStyleName");
-        // c.setStyleName("singleTestStyleName");
-        // c.setDescription("Description here..");
-    }
-
-    void test(CustomComponent c) {
-        // configure common component properties
-        setComponentProperties(c);
-
-        // CustomComponent specific configuration
-        // TWEAK these
-        // c.setComponentType("foo");
-        c.addStyleName("addedTestStyleName");
-    }
-
-    /**
-     * Stresses component by configuring it in a given layout
-     * 
-     * @param c
-     */
-    void test(Layout layout, AbstractComponent c) {
-        test(c);
-        layout.addComponent(c);
-        // add separator
-        if (!(layout instanceof GridLayout)) {
-            layout.addComponent(new Label("<br/><b>NEXT<br/></p>",
-                    Label.CONTENT_XHTML));
-        }
-    }
-
-    public void componentEvent(Event event) {
-        eventCount++;
-        final String feedback = "eventCount=" + eventCount + ", class="
-                + event.getClass() + ", source=" + event.getSource()
-                + ", toString()=" + event.toString();
-        System.out.println("eventListenerFeedback: " + feedback);
-        eventListenerFeedback.setValue("Events: " + eventCount);
-    }
-
-    // For sample actions
-    public Action[] getActions(Object target, Object sender) {
-        return actions;
-    }
-
-    // For sample actions
-    public void handleAction(Action action, Object sender, Object target) {
-        System.out.println("ACTION: " + action.getCaption() + " on item "
-                + target);
-    }
-
-}
index 6719820c44e91fbdff5e1a8fe1f561ea833d7662..b955a023f79272d44f34dfa6d0e40ec641e5610a 100644 (file)
@@ -19,13 +19,11 @@ public class TestIFrames extends CustomComponent {
 
     public void createNewView() {
         main.removeAllComponents();
-        main.addComponent(createEmbedded("../Reservr/"));
+        main.addComponent(createEmbedded("../sampler/"));
         main.addComponent(createEmbedded("../colorpicker"));
         // main.addComponent(createEmbedded("../TestForNativeWindowing"));
-        main
-                .addComponent(createEmbedded("http://toolkit.itmill.com/demo/FeaturesApplication"));
-        main
-                .addComponent(createEmbedded("http://toolkit.itmill.com/demo/TableDemo"));
+        main.addComponent(createEmbedded("http://demo.vaadin.com/timeline"));
+        main.addComponent(createEmbedded("http://demo.vaadin.com/colorpicker"));
     }
 
     private Label createEmbedded(String URL) {