Removing DynaTable2, which is no longer needed since DynaTable was converted.
git-svn-id: https://google-web-toolkit.googlecode.com/svn/releases/1.6@4461 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/eclipse/samples/DynaTable2/.checkstyle b/eclipse/samples/DynaTable2/.checkstyle
deleted file mode 100644
index 0f1cbd9..0000000
--- a/eclipse/samples/DynaTable2/.checkstyle
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<fileset-config file-format-version="1.2.0" simple-config="true">
- <fileset name="all" enabled="true" check-config-name="GWT Checks" local="false">
- <file-match-pattern match-pattern="." include-pattern="true"/>
- </fileset>
- <filter name="NonSrcDirs" enabled="true"/>
-</fileset-config>
diff --git a/eclipse/samples/DynaTable2/.classpath b/eclipse/samples/DynaTable2/.classpath
deleted file mode 100644
index 85b7671..0000000
--- a/eclipse/samples/DynaTable2/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="core/src"/>
- <classpathentry kind="src" output="war" path="core/src.war"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry combineaccessrules="false" kind="src" path="/gwt-user"/>
- <classpathentry kind="output" path="war/WEB-INF/classes"/>
-</classpath>
diff --git a/eclipse/samples/DynaTable2/.project b/eclipse/samples/DynaTable2/.project
deleted file mode 100644
index e8b7c7e..0000000
--- a/eclipse/samples/DynaTable2/.project
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>DynaTable2</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>
- </natures>
- <linkedResources>
- <link>
- <name>core</name>
- <type>2</type>
- <locationURI>GWT_ROOT/samples/dynatable2</locationURI>
- </link>
- </linkedResources>
-</projectDescription>
diff --git a/eclipse/samples/DynaTable2/DynaTable2 compile.launch b/eclipse/samples/DynaTable2/DynaTable2 compile.launch
deleted file mode 100644
index 7313ae5..0000000
--- a/eclipse/samples/DynaTable2/DynaTable2 compile.launch
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/gwt-dev-windows/core/src/com/google/gwt/dev/Compiler.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" javaProject="DynaTable2" path="1" type="4"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/DynaTable2/core/src" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/gwt-user/core/src" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/gwt-user/core/super" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/gwt-dev-windows/core/super" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="DynaTable2"/> </runtimeClasspathEntry> "/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.Compiler"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-style PRETTY com.google.gwt.sample.dynatable2.DynaTable2"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DynaTable2"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea -Xmx256M -Dgwt.devjar=${gwt_devjar}"/>
-</launchConfiguration>
diff --git a/eclipse/samples/DynaTable2/DynaTable2 hosted.launch b/eclipse/samples/DynaTable2/DynaTable2 hosted.launch
deleted file mode 100644
index 21d67c1..0000000
--- a/eclipse/samples/DynaTable2/DynaTable2 hosted.launch
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/DynaTable2"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" javaProject="DynaTable2" path="1" type="4"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/DynaTable2/core/src" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/gwt-user/core/src" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/gwt-user/core/super" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/gwt-dev-windows/core/super" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="DynaTable2"/> </runtimeClasspathEntry> "/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.HostedMode"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-style PRETTY -startupUrl DynaTable2.html com.google.gwt.sample.dynatable2.DynaTable2"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DynaTable2"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea -Xmx256M -Dgwt.devjar=${gwt_devjar}"/>
-</launchConfiguration>
diff --git a/eclipse/samples/DynaTable2/DynaTable2 server.launch b/eclipse/samples/DynaTable2/DynaTable2 server.launch
deleted file mode 100644
index c2f361d..0000000
--- a/eclipse/samples/DynaTable2/DynaTable2 server.launch
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/DynaTable2"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
-<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" javaProject="DynaTable2" path="1" type="4"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="GWT_TOOLS/lib/jetty/jetty-6.1.11.jar" path="3" type="3"/> "/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.mortbay.jetty.Main"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="8888 -webapp war"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DynaTable2"/>
-</launchConfiguration>
diff --git a/eclipse/samples/DynaTable2/DynaTable2Legacy compile.launch b/eclipse/samples/DynaTable2/DynaTable2Legacy compile.launch
deleted file mode 100644
index ed7f83f..0000000
--- a/eclipse/samples/DynaTable2/DynaTable2Legacy compile.launch
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/gwt-dev-windows/core/src/com/google/gwt/dev/GWTCompiler.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" javaProject="DynaTable2" path="1" type="4"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/DynaTable2/core/src" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/gwt-user/core/src" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/gwt-user/core/super" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/gwt-dev-windows/core/super" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="DynaTable2"/> </runtimeClasspathEntry> "/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.GWTCompiler"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out www -style PRETTY com.google.gwt.sample.dynatable2.DynaTable2Legacy"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DynaTable2"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea -Xmx256M -Dgwt.devjar=${gwt_devjar}"/>
-</launchConfiguration>
diff --git a/eclipse/samples/DynaTable2/DynaTable2Legacy shell.launch b/eclipse/samples/DynaTable2/DynaTable2Legacy shell.launch
deleted file mode 100644
index 0458d36..0000000
--- a/eclipse/samples/DynaTable2/DynaTable2Legacy shell.launch
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/gwt-dev-windows/core/src/com/google/gwt/dev/GWTShell.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" javaProject="DynaTable2" path="1" type="4"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/DynaTable2/core/src" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/gwt-user/core/src" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/gwt-user/core/super" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/gwt-dev-windows/core/super" path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="DynaTable2"/> </runtimeClasspathEntry> "/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.GWTShell"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out www -style PRETTY com.google.gwt.sample.dynatable2.DynaTable2Legacy/DynaTable2Legacy.html"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DynaTable2"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea -Xmx256M -Dgwt.devjar=${gwt_devjar}"/>
-</launchConfiguration>
diff --git a/eclipse/samples/DynaTable2/build.xml b/eclipse/samples/DynaTable2/build.xml
deleted file mode 100644
index b49d710..0000000
--- a/eclipse/samples/DynaTable2/build.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-<project name="dynatable2" default="build" basedir=".">
- <property name="gwt.install" location="../../../build/lib" />
- <property name="outdir" location="war" />
- <property name="extradir" location="extra" />
-
- <target name="javac" description="Compile project to WEB-INF/classes">
- <mkdir dir="${outdir}/WEB-INF/classes" />
- <javac srcdir="../../../samples/dynatable/src"
- destdir="${outdir}/WEB-INF/classes"
- debug="true"
- debuglevel="lines,vars,source"
- source="1.5"
- target="1.5"
- nowarn="true"
- encoding="utf-8">
- <classpath>
- <pathelement location="${gwt.install}/gwt-user.jar" />
- <pathelement location="${gwt.install}/gwt-dev-windows.jar" />
- </classpath>
- </javac>
- </target>
-
- <target name="deploy" depends="gwtc" description="Copy output to the war folder">
- <mkdir dir="${outdir}/WEB-INF/lib" />
- <copy todir="${outdir}/WEB-INF/lib" file="${gwt.install}/gwt-servlet.jar" />
- </target>
-
- <target name="gwtc" depends="javac" description="Compile to JavaScript">
- <java classname="com.google.gwt.dev.GWTCompiler" fork="yes" failonerror="true">
- <jvmarg value="-Xmx256M"/>
- <arg value="-out" />
- <arg file="${outdir}" />
- <arg value="-extra" />
- <arg file="${extradir}" />
- <arg value="com.google.gwt.sample.dynatable.DynaTable2" />
- <classpath>
- <pathelement location="../../../samples/dynatable/src" />
- <pathelement location="${outdir}/WEB-INF/classes" />
- <pathelement location="${gwt.install}/gwt-user.jar" />
- <pathelement location="${gwt.install}/gwt-dev-windows.jar" />
- </classpath>
- </java>
- </target>
-
- <target name="server" depends="deploy" description="Run the deployed app in a Jetty server">
- <echo message="PLEASE BROWSE TO: http://localhost:8888/DynaTable2.html"/>
- <java classname="org.mortbay.jetty.Main" fork="yes">
- <arg value="8888" />
- <arg value="-webapp" />
- <arg file="${outdir}" />
- <classpath>
- <pathelement location="${gwt.install}/gwt-dev-windows.jar" />
- </classpath>
- </java>
- </target>
-
- <target name="shell" depends="javac" description="Run the deployed app in GWT hosted mode">
- <java classname="com.google.gwt.dev.GWTHosted" fork="yes" failonerror="true">
- <jvmarg value="-Xmx256M"/>
- <jvmarg value="-Dgwt.devjar=C:\gwt\releases\1.6\build\staging\gwt-windows-0.0.0\gwt-dev-windows.jar"/>
- <arg value="-out" />
- <arg file="${outdir}" />
- <arg value="-extra" />
- <arg file="${extradir}" />
- <arg value="-startupUrl" />
- <arg value="DynaTable2.html" />
- <arg value="com.google.gwt.sample.dynatable.DynaTable2" />
- <classpath>
- <pathelement location="../../../samples/dynatable/src" />
- <pathelement location="${outdir}/WEB-INF/classes" />
- <pathelement location="${gwt.install}/gwt-user.jar" />
- <pathelement location="${gwt.install}/gwt-dev-windows.jar" />
- </classpath>
- </java>
- </target>
-
- <target name="build" depends="javac, gwtc, deploy" description="Build this project" />
-
- <target name="clean" description="Cleans this project's intermediate and output files">
- <delete dir="${outdir}/WEB-INF/classes" failonerror="false" />
- <delete dir="${outdir}/gwtc" failonerror="false" />
- <delete dir="${extradir}" failonerror="false" />
- </target>
-</project>
diff --git a/eclipse/samples/DynaTable2/war/DynaTable2.css b/eclipse/samples/DynaTable2/war/DynaTable2.css
deleted file mode 100644
index ab81abf..0000000
--- a/eclipse/samples/DynaTable2/war/DynaTable2.css
+++ /dev/null
@@ -1,85 +0,0 @@
-
-body {
- background-color: white;
- color: black;
- font-family: Arial, sans-serif;
- font-size: small;
- margin: 8px;
- margin-top: 3px;
-}
-
-.DynaTable-DynaTableWidget {
- width: 100%;
- border: 1px solid #ACA899;
-}
-
-
-.DynaTable-DynaTableWidget .navbar {
- width: 100%;
- background-color: #ECE9D8;
- vertical-align: middle;
- border-bottom: 1px solid #ACA899;
-}
-
-.DynaTable-DynaTableWidget .navbar button {
- width: 3em;
- text-align: center;
- vertical-align: middle;
-}
-
-.DynaTable-DynaTableWidget .navbar .status {
- vertical-align: middle;
- padding-right: 10px;
-}
-
-.DynaTable-DynaTableWidget .table {
- margin: 10px;
-}
-
-.DynaTable-DynaTableWidget .table td.header {
- text-align: left;
- font-weight: bold;
- text-decoration: underline;
-}
-
-.DynaTable-DynaTableWidget .table td.name {
- width: 10em;
-}
-
-.DynaTable-DynaTableWidget .table td.desc {
- width: 20em;
-}
-
-.DynaTable-DynaTableWidget .table td.sched {
- width: 20em;
-}
-
-.DynaTable-DynaTableWidget .table td {
- vertical-align: top;
-}
-
-.DynaTable-DayFilterWidget {
- margin: 3em 1em 1em 0;
- width: 10em;
- padding: 0px 8px 0px 8px;
- border: 1px solid #ACA899;
-}
-
-.DynaTable-DayFilterWidget button {
- width: 4em;
- margin: 8px 4px 8px 4px;
-}
-
-.DynaTable-ErrorDialog {
- border: 2px outset;
- background-color: white;
- width: 50%;
-}
-
-.DynaTable-ErrorDialog .Caption {
- background-color: #C3D9FF;
- padding: 3px;
- margin: 2px;
- font-weight: bold;
- cursor: default;
-}
diff --git a/eclipse/samples/DynaTable2/war/DynaTable2.html b/eclipse/samples/DynaTable2/war/DynaTable2.html
deleted file mode 100644
index 8f29e24..0000000
--- a/eclipse/samples/DynaTable2/war/DynaTable2.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!-- -->
-<!-- Copyright 2008 Google Inc. -->
-<!-- Licensed under the Apache License, Version 2.0 (the "License"); you -->
-<!-- may not use this file except in compliance with the License. You may -->
-<!-- may obtain a copy of the License at -->
-<!-- -->
-<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
-<!-- -->
-<!-- Unless required by applicable law or agreed to in writing, software -->
-<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
-<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -->
-<!-- implied. License for the specific language governing permissions and -->
-<!-- limitations under the License. -->
-
-<html>
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8">
- <link type="text/css" rel="stylesheet" href="DynaTable2.css">
- <title></title>
- </head>
- <body>
- <iframe src="javascript:''" id='__gwt_historyFrame' tabIndex='-1' style='width:0;height:0;border:0'></iframe>
- <script type="text/javascript" language='javascript' src='gwtc/dynatable.nocache.js'></script>
- <h1>School Schedule for Professors and Students</h1>
- <table width="100%" border="0" summary="School Schedule for Professors and Students">
- <tr valign="top">
- <td id="calendar" align="center" width="90%">
- </td>
- <td id="days" align="center" width="10%">
- </td>
- </tr>
- </table>
- </body>
-</html>
diff --git a/eclipse/samples/DynaTable2/war/WEB-INF/web.xml b/eclipse/samples/DynaTable2/war/WEB-INF/web.xml
deleted file mode 100644
index 1880c9e..0000000
--- a/eclipse/samples/DynaTable2/war/WEB-INF/web.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app>
-
- <servlet>
- <servlet-name>calendar</servlet-name>
- <servlet-class>com.google.gwt.sample.dynatable.server.SchoolCalendarServiceImpl</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>calendar</servlet-name>
- <url-pattern>/gwtc/calendar</url-pattern>
- </servlet-mapping>
-
-</web-app>
diff --git a/samples/dynatable2/build.xml b/samples/dynatable2/build.xml
deleted file mode 100644
index 00c96d6..0000000
--- a/samples/dynatable2/build.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<project name="dynatable" default="build" basedir=".">
- <property name="sample.root" value="dynatable" />
- <property name="sample.module" value="DynaTable" />
- <import file="../common.ant.xml" />
-</project>
diff --git a/samples/dynatable2/src.war/DynaTable2.css b/samples/dynatable2/src.war/DynaTable2.css
deleted file mode 100644
index ab81abf..0000000
--- a/samples/dynatable2/src.war/DynaTable2.css
+++ /dev/null
@@ -1,85 +0,0 @@
-
-body {
- background-color: white;
- color: black;
- font-family: Arial, sans-serif;
- font-size: small;
- margin: 8px;
- margin-top: 3px;
-}
-
-.DynaTable-DynaTableWidget {
- width: 100%;
- border: 1px solid #ACA899;
-}
-
-
-.DynaTable-DynaTableWidget .navbar {
- width: 100%;
- background-color: #ECE9D8;
- vertical-align: middle;
- border-bottom: 1px solid #ACA899;
-}
-
-.DynaTable-DynaTableWidget .navbar button {
- width: 3em;
- text-align: center;
- vertical-align: middle;
-}
-
-.DynaTable-DynaTableWidget .navbar .status {
- vertical-align: middle;
- padding-right: 10px;
-}
-
-.DynaTable-DynaTableWidget .table {
- margin: 10px;
-}
-
-.DynaTable-DynaTableWidget .table td.header {
- text-align: left;
- font-weight: bold;
- text-decoration: underline;
-}
-
-.DynaTable-DynaTableWidget .table td.name {
- width: 10em;
-}
-
-.DynaTable-DynaTableWidget .table td.desc {
- width: 20em;
-}
-
-.DynaTable-DynaTableWidget .table td.sched {
- width: 20em;
-}
-
-.DynaTable-DynaTableWidget .table td {
- vertical-align: top;
-}
-
-.DynaTable-DayFilterWidget {
- margin: 3em 1em 1em 0;
- width: 10em;
- padding: 0px 8px 0px 8px;
- border: 1px solid #ACA899;
-}
-
-.DynaTable-DayFilterWidget button {
- width: 4em;
- margin: 8px 4px 8px 4px;
-}
-
-.DynaTable-ErrorDialog {
- border: 2px outset;
- background-color: white;
- width: 50%;
-}
-
-.DynaTable-ErrorDialog .Caption {
- background-color: #C3D9FF;
- padding: 3px;
- margin: 2px;
- font-weight: bold;
- cursor: default;
-}
diff --git a/samples/dynatable2/src.war/DynaTable2.html b/samples/dynatable2/src.war/DynaTable2.html
deleted file mode 100644
index d4b8b2e..0000000
--- a/samples/dynatable2/src.war/DynaTable2.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!-- -->
-<!-- Copyright 2008 Google Inc. -->
-<!-- Licensed under the Apache License, Version 2.0 (the "License"); you -->
-<!-- may not use this file except in compliance with the License. You may -->
-<!-- may obtain a copy of the License at -->
-<!-- -->
-<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
-<!-- -->
-<!-- Unless required by applicable law or agreed to in writing, software -->
-<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
-<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -->
-<!-- implied. License for the specific language governing permissions and -->
-<!-- limitations under the License. -->
-
-<html>
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8">
- <link type="text/css" rel="stylesheet" href="DynaTable2.css">
- <title></title>
- </head>
- <body>
- <iframe src="javascript:''" id='__gwt_historyFrame' tabIndex='-1' style='width:0;height:0;border:0'></iframe>
- <script type="text/javascript" language='javascript' src='dynatable2/dynatable2.nocache.js'></script>
- <h1>School Schedule for Professors and Students</h1>
- <table width="100%" border="0" summary="School Schedule for Professors and Students">
- <tr valign="top">
- <td id="calendar" align="center" width="90%">
- </td>
- <td id="days" align="center" width="10%">
- </td>
- </tr>
- </table>
- </body>
-</html>
diff --git a/samples/dynatable2/src.war/WEB-INF/classes/marker b/samples/dynatable2/src.war/WEB-INF/classes/marker
deleted file mode 100644
index e69de29..0000000
--- a/samples/dynatable2/src.war/WEB-INF/classes/marker
+++ /dev/null
diff --git a/samples/dynatable2/src.war/WEB-INF/web.xml b/samples/dynatable2/src.war/WEB-INF/web.xml
deleted file mode 100644
index 1feeb14..0000000
--- a/samples/dynatable2/src.war/WEB-INF/web.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app>
-
- <servlet>
- <servlet-name>calendar</servlet-name>
- <servlet-class>
- com.google.gwt.sample.dynatable2.server.SchoolCalendarServiceImpl
- </servlet-class>
- </servlet>
- <servlet-mapping>
- <servlet-name>calendar</servlet-name>
- <url-pattern>/dynatable2/calendar</url-pattern>
- </servlet-mapping>
-
-</web-app>
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/COPYING b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/COPYING
deleted file mode 100644
index d9a10c0..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/COPYING
+++ /dev/null
@@ -1,176 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/DynaTable2.gwt.xml b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/DynaTable2.gwt.xml
deleted file mode 100644
index 7781947..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/DynaTable2.gwt.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<!-- -->
-<!-- Copyright 2007 Google Inc. -->
-<!-- Licensed under the Apache License, Version 2.0 (the "License"); you -->
-<!-- may not use this file except in compliance with the License. You may -->
-<!-- may obtain a copy of the License at -->
-<!-- -->
-<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
-<!-- -->
-<!-- Unless required by applicable law or agreed to in writing, software -->
-<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
-<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -->
-<!-- implied. License for the specific language governing permissions and -->
-<!-- limitations under the License. -->
-
-<module rename-to="dynatable2">
- <inherits name='com.google.gwt.user.User'/>
- <entry-point class='com.google.gwt.sample.dynatable2.client.DynaTable'/>
- <servlet path='/calendar' class='com.google.gwt.sample.dynatable2.server.SchoolCalendarServiceImpl'/>
-</module>
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/DynaTable2Legacy.gwt.xml b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/DynaTable2Legacy.gwt.xml
deleted file mode 100644
index 85f806e..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/DynaTable2Legacy.gwt.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<!-- -->
-<!-- Copyright 2007 Google Inc. -->
-<!-- Licensed under the Apache License, Version 2.0 (the "License"); you -->
-<!-- may not use this file except in compliance with the License. You may -->
-<!-- may obtain a copy of the License at -->
-<!-- -->
-<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
-<!-- -->
-<!-- Unless required by applicable law or agreed to in writing, software -->
-<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
-<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -->
-<!-- implied. License for the specific language governing permissions and -->
-<!-- limitations under the License. -->
-
-<module>
- <inherits name='com.google.gwt.user.User'/>
- <entry-point class='com.google.gwt.sample.dynatable2.client.DynaTable'/>
- <servlet path='/calendar' class='com.google.gwt.sample.dynatable2.server.SchoolCalendarServiceImpl'/>
- <public path='legacyPublic'/>
-</module>
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DayFilterWidget.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DayFilterWidget.java
deleted file mode 100644
index 7be4cd8..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DayFilterWidget.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright 2007 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.dynatable2.client;
-
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.CheckBox;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.HasAlignment;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.user.client.ui.Widget;
-
-/**
- * A UI Widget that allows a user to filter the days being displayed in the
- * dynamic table.
- */
-public class DayFilterWidget extends Composite {
-
- private class DayCheckBox extends CheckBox {
- public final int day;
-
- public DayCheckBox(String caption, int day) {
- super(caption);
-
- // Remember custom data for this widget.
- this.day = day;
-
- // Use a shared handler to save memory.
- addClickHandler(dayCheckBoxHandler);
-
- // Initialize based on the calendar's current value.
- setChecked(calendar.getDayIncluded(day));
- }
- }
-
- private class DayCheckBoxHandler implements ClickHandler {
- public void onClick(ClickEvent event) {
- onClick((DayCheckBox) event.getSource());
- }
-
- public void onClick(DayCheckBox dayCheckBox) {
- calendar.setDayIncluded(dayCheckBox.day, dayCheckBox.isChecked());
- }
- }
-
- private final SchoolCalendarWidget calendar;
-
- private final VerticalPanel outer = new VerticalPanel();
-
- private final DayCheckBoxHandler dayCheckBoxHandler = new DayCheckBoxHandler();
-
- public DayFilterWidget(SchoolCalendarWidget calendar) {
- this.calendar = calendar;
- initWidget(outer);
- setStyleName("DynaTable-DayFilterWidget");
- outer.add(new DayCheckBox("Sunday", 0));
- outer.add(new DayCheckBox("Monday", 1));
- outer.add(new DayCheckBox("Tuesday", 2));
- outer.add(new DayCheckBox("Wednesday", 3));
- outer.add(new DayCheckBox("Thursday", 4));
- outer.add(new DayCheckBox("Friday", 5));
- outer.add(new DayCheckBox("Saturday", 6));
-
- Button buttonAll = new Button("All", new ClickHandler() {
- public void onClick(ClickEvent event) {
- setAllCheckBoxes(true);
- }
- });
-
- Button buttonNone = new Button("None", new ClickHandler() {
- public void onClick(ClickEvent event) {
- setAllCheckBoxes(false);
- }
- });
-
- HorizontalPanel hp = new HorizontalPanel();
- hp.setHorizontalAlignment(HasAlignment.ALIGN_CENTER);
- hp.add(buttonAll);
- hp.add(buttonNone);
-
- outer.add(hp);
- outer.setCellVerticalAlignment(hp, HasAlignment.ALIGN_BOTTOM);
- outer.setCellHorizontalAlignment(hp, HasAlignment.ALIGN_CENTER);
- }
-
- private void setAllCheckBoxes(boolean checked) {
- for (int i = 0, n = outer.getWidgetCount(); i < n; ++i) {
- Widget w = outer.getWidget(i);
- if (w instanceof DayCheckBox) {
- ((DayCheckBox) w).setChecked(checked);
- dayCheckBoxHandler.onClick((DayCheckBox) w);
- }
- }
- }
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DynaTable.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DynaTable.java
deleted file mode 100644
index 41e208b..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DynaTable.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2007 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.dynatable2.client;
-
-import com.google.gwt.core.client.EntryPoint;
-import com.google.gwt.user.client.ui.RootPanel;
-
-/**
- * The entry point class which performs the initial loading of the DynaTable
- * application.
- */
-public class DynaTable implements EntryPoint {
-
- public void onModuleLoad() {
- // Find the slot for the calendar widget.
- //
- RootPanel slot = RootPanel.get("calendar");
- if (slot != null) {
- SchoolCalendarWidget calendar = new SchoolCalendarWidget(15);
- slot.add(calendar);
-
- // Find the slot for the days filter widget.
- //
- slot = RootPanel.get("days");
- if (slot != null) {
- DayFilterWidget filter = new DayFilterWidget(calendar);
- slot.add(filter);
- }
- }
- }
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DynaTableDataProvider.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DynaTableDataProvider.java
deleted file mode 100644
index 6875d63..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DynaTableDataProvider.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2007 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.dynatable2.client;
-
-/**
- * An interface for providing row-level updates of data, intended here to used
- * to update a DynaTableWidget.
- */
-public interface DynaTableDataProvider {
-
- /**
- * An interface allow a widget to accept or report failure when a row data
- * is issued for update.
- */
- interface RowDataAcceptor {
- void accept(int startRow, String[][] rows);
- void failed(Throwable caught);
- }
-
- void updateRowData(int startRow, int maxRows, RowDataAcceptor acceptor);
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DynaTableWidget.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DynaTableWidget.java
deleted file mode 100644
index fb96245..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/DynaTableWidget.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- * Copyright 2007 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.dynatable2.client;
-
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.sample.dynatable2.client.DynaTableDataProvider.RowDataAcceptor;
-import com.google.gwt.user.client.rpc.InvocationException;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.DialogBox;
-import com.google.gwt.user.client.ui.DockPanel;
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.user.client.ui.HTML;
-import com.google.gwt.user.client.ui.HasAlignment;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.VerticalPanel;
-
-/**
- * A composite Widget that implements the main interface for the dynamic table,
- * including the data table, status indicators, and paging buttons.
- */
-public class DynaTableWidget extends Composite {
-
- /**
- * A dialog box for displaying an error.
- */
- private static class ErrorDialog extends DialogBox implements ClickHandler {
- private HTML body = new HTML("");
-
- public ErrorDialog() {
- setStylePrimaryName("DynaTable-ErrorDialog");
- Button closeButton = new Button("Close", this);
- VerticalPanel panel = new VerticalPanel();
- panel.setSpacing(4);
- panel.add(body);
- panel.add(closeButton);
- panel.setCellHorizontalAlignment(closeButton, VerticalPanel.ALIGN_RIGHT);
- setWidget(panel);
- }
-
- public String getBody() {
- return body.getHTML();
- }
-
- public void onClick(ClickEvent event) {
- hide();
- }
-
- public void setBody(String html) {
- body.setHTML(html);
- }
- }
-
- private class NavBar extends Composite implements ClickHandler {
-
- public final DockPanel bar = new DockPanel();
- public final Button gotoFirst = new Button("<<", this);
- public final Button gotoNext = new Button(">", this);
- public final Button gotoPrev = new Button("<", this);
- public final HTML status = new HTML();
-
- public NavBar() {
- initWidget(bar);
- bar.setStyleName("navbar");
- status.setStyleName("status");
-
- HorizontalPanel buttons = new HorizontalPanel();
- buttons.add(gotoFirst);
- buttons.add(gotoPrev);
- buttons.add(gotoNext);
- bar.add(buttons, DockPanel.EAST);
- bar.setCellHorizontalAlignment(buttons, DockPanel.ALIGN_RIGHT);
- bar.add(status, DockPanel.CENTER);
- bar.setVerticalAlignment(DockPanel.ALIGN_MIDDLE);
- bar.setCellHorizontalAlignment(status, HasAlignment.ALIGN_RIGHT);
- bar.setCellVerticalAlignment(status, HasAlignment.ALIGN_MIDDLE);
- bar.setCellWidth(status, "100%");
-
- // Initialize prev & first button to disabled.
- //
- gotoPrev.setEnabled(false);
- gotoFirst.setEnabled(false);
- }
-
- public void onClick(ClickEvent event) {
- Object source = event.getSource();
- if (source == gotoNext) {
- startRow += getDataRowCount();
- refresh();
- } else if (source == gotoPrev) {
- startRow -= getDataRowCount();
- if (startRow < 0) {
- startRow = 0;
- }
- refresh();
- } else if (source == gotoFirst) {
- startRow = 0;
- refresh();
- }
- }
- }
-
- private class RowDataAcceptorImpl implements RowDataAcceptor {
- public void accept(int startRow, String[][] data) {
-
- int destRowCount = getDataRowCount();
- int destColCount = grid.getCellCount(0);
- assert (data.length <= destRowCount) : "Too many rows";
-
- int srcRowIndex = 0;
- int srcRowCount = data.length;
- int destRowIndex = 1; // skip navbar row
- for (; srcRowIndex < srcRowCount; ++srcRowIndex, ++destRowIndex) {
- String[] srcRowData = data[srcRowIndex];
- assert (srcRowData.length == destColCount) : " Column count mismatch";
- for (int srcColIndex = 0; srcColIndex < destColCount; ++srcColIndex) {
- String cellHTML = srcRowData[srcColIndex];
- grid.setText(destRowIndex, srcColIndex, cellHTML);
- }
- }
-
- // Clear remaining table rows.
- //
- boolean isLastPage = false;
- for (; destRowIndex < destRowCount + 1; ++destRowIndex) {
- isLastPage = true;
- for (int destColIndex = 0; destColIndex < destColCount; ++destColIndex) {
- grid.clearCell(destRowIndex, destColIndex);
- }
- }
-
- // Synchronize the nav buttons.
- navbar.gotoNext.setEnabled(!isLastPage);
- navbar.gotoFirst.setEnabled(startRow > 0);
- navbar.gotoPrev.setEnabled(startRow > 0);
-
- // Update the status message.
- //
- setStatusText((startRow + 1) + " - " + (startRow + srcRowCount));
- }
-
- public void failed(Throwable caught) {
- setStatusText("Error");
- if (errorDialog == null) {
- errorDialog = new ErrorDialog();
- }
- if (caught instanceof InvocationException) {
- errorDialog.setText("An RPC server could not be reached");
- errorDialog.setBody(NO_CONNECTION_MESSAGE);
- } else {
- errorDialog.setText("Unexcepted Error processing remote call");
- errorDialog.setBody(caught.getMessage());
- }
- errorDialog.center();
- }
- }
-
- private static final String NO_CONNECTION_MESSAGE = "<p>The DynaTable example uses a <a href=\"http://code.google.com/"
- + "webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide."
- + "RemoteProcedureCalls.html\" target=\"_blank\">Remote Procedure Call</a> "
- + "(RPC) to request data from the server. In order for the RPC to "
- + "successfully return data, the server component must be available.</p>"
- + "<p>If you are running this demo from compiled code, the server "
- + "component may not be available to respond to the RPC requests from "
- + "DynaTable. Try running DynaTable in hosted mode to see the demo "
- + "in action.</p> "
- + "<p>Click on the Remote Procedure Call link above for more information "
- + "on GWT's RPC infrastructure.";
-
- private final RowDataAcceptor acceptor = new RowDataAcceptorImpl();
-
- private final Grid grid = new Grid();
-
- private final NavBar navbar = new NavBar();
-
- private ErrorDialog errorDialog = null;
-
- private final DockPanel outer = new DockPanel();
-
- private final DynaTableDataProvider provider;
-
- private int startRow = 0;
-
- public DynaTableWidget(DynaTableDataProvider provider, String[] columns,
- String[] columnStyles, int rowCount) {
-
- if (columns.length == 0) {
- throw new IllegalArgumentException(
- "expecting a positive number of columns");
- }
-
- if (columnStyles != null && columns.length != columnStyles.length) {
- throw new IllegalArgumentException("expecting as many styles as columns");
- }
-
- this.provider = provider;
- initWidget(outer);
- grid.setStyleName("table");
- outer.add(navbar, DockPanel.NORTH);
- outer.add(grid, DockPanel.CENTER);
- initTable(columns, columnStyles, rowCount);
- setStyleName("DynaTable-DynaTableWidget");
- }
-
- public void clearStatusText() {
- navbar.status.setHTML(" ");
- }
-
- public void refresh() {
- // Disable buttons temporarily to stop the user from running off the end.
- //
- navbar.gotoFirst.setEnabled(false);
- navbar.gotoPrev.setEnabled(false);
- navbar.gotoNext.setEnabled(false);
-
- setStatusText("Please wait...");
- provider.updateRowData(startRow, grid.getRowCount() - 1, acceptor);
- }
-
- public void setRowCount(int rows) {
- grid.resizeRows(rows);
- }
-
- public void setStatusText(String text) {
- navbar.status.setText(text);
- }
-
- private int getDataRowCount() {
- return grid.getRowCount() - 1;
- }
-
- private void initTable(String[] columns, String[] columnStyles, int rowCount) {
- // Set up the header row. It's one greater than the number of visible rows.
- //
- grid.resize(rowCount + 1, columns.length);
- for (int i = 0, n = columns.length; i < n; i++) {
- grid.setText(0, i, columns[i]);
- if (columnStyles != null) {
- grid.getCellFormatter().setStyleName(0, i, columnStyles[i] + " header");
- }
- }
- }
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Person.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Person.java
deleted file mode 100644
index d73702f..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Person.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2007 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.dynatable2.client;
-
-import com.google.gwt.user.client.rpc.IsSerializable;
-
-/**
- * Hold relevant data for Person. This class is meant to be serialized in RPC
- * calls.
- */
-public abstract class Person implements IsSerializable {
-
- private String description = "DESC";
-
- private String name;
-
- public Person() {
- }
-
- public String getDescription() {
- return description;
- }
-
- public String getName() {
- return name;
- }
-
- public abstract String getSchedule(boolean[] daysFilter);
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Professor.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Professor.java
deleted file mode 100644
index 932d188..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Professor.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2007 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.dynatable2.client;
-
-/**
- * Holds relevant data for a Professor type Person. This class is intended to be
- * serialized in RPC calls.
- */
-public class Professor extends Person {
-
- private Schedule teachingSchedule = new Schedule();
-
- public Professor() {
- }
-
- @Override
- public String getSchedule(boolean[] daysFilter) {
- return teachingSchedule.getDescription(daysFilter);
- }
-
- public Schedule getTeachingSchedule() {
- return teachingSchedule;
- }
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Schedule.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Schedule.java
deleted file mode 100644
index ac0b40e..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Schedule.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2008 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.dynatable2.client;
-
-import com.google.gwt.user.client.rpc.IsSerializable;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Hold the relevant data for a Schedule. This class is meant to be serialized
- * in RPC calls.
- */
-public class Schedule implements IsSerializable {
-
- private List<TimeSlot> timeSlots = new ArrayList<TimeSlot>();
-
- public Schedule() {
- }
-
- public void addTimeSlot(TimeSlot timeSlot) {
- timeSlots.add(timeSlot);
- }
-
- public String getDescription(boolean[] daysFilter) {
- String s = null;
- for (TimeSlot timeSlot : timeSlots) {
- if (daysFilter[timeSlot.getDayOfWeek()]) {
- if (s == null) {
- s = timeSlot.getDescription();
- } else {
- s += ", " + timeSlot.getDescription();
- }
- }
- }
-
- if (s != null) {
- return s;
- } else {
- return "";
- }
- }
-
- @Override
- public String toString() {
- return getDescription(null);
- }
-
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/SchoolCalendarService.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/SchoolCalendarService.java
deleted file mode 100644
index fee68f6..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/SchoolCalendarService.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2007 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.dynatable2.client;
-
-import com.google.gwt.user.client.rpc.RemoteService;
-
-/**
- * The interface for the RPC server endpoint to get school calendar
- * information.
- */
-public interface SchoolCalendarService extends RemoteService {
-
- Person[] getPeople(int startIndex, int maxCount);
-
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/SchoolCalendarServiceAsync.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/SchoolCalendarServiceAsync.java
deleted file mode 100644
index 3aa3757..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/SchoolCalendarServiceAsync.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2007 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.dynatable2.client;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-
-/**
- * The interface for the RPC server endpoint that provides school calendar
- * information for clients that will be calling asynchronously.
- */
-public interface SchoolCalendarServiceAsync {
-
- void getPeople(int startIndex, int maxCount, AsyncCallback<Person[]> callback);
-
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/SchoolCalendarWidget.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/SchoolCalendarWidget.java
deleted file mode 100644
index 65e4fd2..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/SchoolCalendarWidget.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright 2007 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.dynatable2.client;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.DeferredCommand;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.google.gwt.user.client.rpc.ServiceDefTarget;
-import com.google.gwt.user.client.ui.Composite;
-
-/**
- * A Composite widget that abstracts a DynaTableWidget and a data provider tied
- * to the <@link SchoolCalendarService> RPC endpoint.
- */
-public class SchoolCalendarWidget extends Composite {
-
- /**
- * A data provider that bridges the provides row level updates from the data
- * available through a <@link SchoolCalendarService>.
- */
- public class CalendarProvider implements DynaTableDataProvider {
-
- private final SchoolCalendarServiceAsync calService;
-
- private int lastMaxRows = -1;
-
- private Person[] lastPeople;
-
- private int lastStartRow = -1;
-
- public CalendarProvider() {
- // Initialize the service.
- //
- calService = (SchoolCalendarServiceAsync) GWT.create(SchoolCalendarService.class);
-
- // By default, we assume we'll make RPCs to a servlet, but see
- // updateRowData(). There is special support for canned RPC responses.
- // (Which is a totally demo hack, by the way :-)
- //
- ServiceDefTarget target = (ServiceDefTarget) calService;
-
- // Use a module-relative URLs to ensure that this client code can find
- // its way home, even when the URL changes (as might happen when you
- // deploy this as a webapp under an external servlet container).
- String moduleRelativeURL = GWT.getModuleBaseURL() + "calendar";
- target.setServiceEntryPoint(moduleRelativeURL);
- }
-
- public void updateRowData(final int startRow, final int maxRows,
- final RowDataAcceptor acceptor) {
- // Check the simple cache first.
- //
- if (startRow == lastStartRow) {
- if (maxRows == lastMaxRows) {
- // Use the cached batch.
- //
- pushResults(acceptor, startRow, lastPeople);
- return;
- }
- }
-
- // Fetch the data remotely.
- //
- calService.getPeople(startRow, maxRows, new AsyncCallback<Person[]>() {
- public void onFailure(Throwable caught) {
- acceptor.failed(caught);
- }
-
- public void onSuccess(Person[] result) {
- lastStartRow = startRow;
- lastMaxRows = maxRows;
- lastPeople = result;
- pushResults(acceptor, startRow, result);
- }
-
- });
- }
-
- private void pushResults(RowDataAcceptor acceptor, int startRow,
- Person[] people) {
- String[][] rows = new String[people.length][];
- for (int i = 0, n = rows.length; i < n; i++) {
- Person person = people[i];
- rows[i] = new String[3];
- rows[i][0] = person.getName();
- rows[i][1] = person.getDescription();
- rows[i][2] = person.getSchedule(daysFilter);
- }
- acceptor.accept(startRow, rows);
- }
- }
-
- private final CalendarProvider calProvider = new CalendarProvider();
-
- private final boolean[] daysFilter = new boolean[] {
- true, true, true, true, true, true, true};
-
- private final DynaTableWidget dynaTable;
-
- private Command pendingRefresh;
-
- public SchoolCalendarWidget(int visibleRows) {
- String[] columns = new String[] {"Name", "Description", "Schedule"};
- String[] styles = new String[] {"name", "desc", "sched"};
- dynaTable = new DynaTableWidget(calProvider, columns, styles, visibleRows);
- initWidget(dynaTable);
- }
-
- protected boolean getDayIncluded(int day) {
- return daysFilter[day];
- }
-
- @Override
- protected void onLoad() {
- dynaTable.refresh();
- }
-
- protected void setDayIncluded(int day, boolean included) {
- if (daysFilter[day] == included) {
- // No change.
- //
- return;
- }
-
- daysFilter[day] = included;
- if (pendingRefresh == null) {
- pendingRefresh = new Command() {
- public void execute() {
- pendingRefresh = null;
- dynaTable.refresh();
- }
- };
- DeferredCommand.addCommand(pendingRefresh);
- }
- }
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Student.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Student.java
deleted file mode 100644
index ff8d068..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/Student.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2007 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.dynatable2.client;
-
-/**
- * Holds relevant data for a Student type Person. This class is intended to be
- * serialized in RPC calls.
- */
-public class Student extends Person {
-
- private Schedule classSchedule = new Schedule();
-
- public Schedule getClassSchedule() {
- return classSchedule;
- }
-
- @Override
- public String getSchedule(boolean[] daysFilter) {
- return classSchedule.getDescription(daysFilter);
- }
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/TimeSlot.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/TimeSlot.java
deleted file mode 100644
index 1a0f130..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/client/TimeSlot.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright 2007 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.dynatable2.client;
-
-import com.google.gwt.user.client.rpc.IsSerializable;
-
-/**
- * Hold relevant data for a time slot. This class is intended to be serialized
- * as part of RPC calls.
- */
-public class TimeSlot implements IsSerializable, Comparable<TimeSlot> {
-
- private static final transient String[] DAYS = new String[] {
- "Sun", "Mon", "Tues", "Wed", "Thurs", "Fri", "Sat"};
-
- private int endMinutes;
-
- private int startMinutes;
-
- private int zeroBasedDayOfWeek;
-
- public TimeSlot() {
- }
-
- public TimeSlot(int zeroBasedDayOfWeek, int startMinutes, int endMinutes) {
- this.zeroBasedDayOfWeek = zeroBasedDayOfWeek;
- this.startMinutes = startMinutes;
- this.endMinutes = endMinutes;
- }
-
- public int compareTo(TimeSlot o) {
- if (zeroBasedDayOfWeek < o.zeroBasedDayOfWeek) {
- return -1;
- } else if (zeroBasedDayOfWeek > o.zeroBasedDayOfWeek) {
- return 1;
- } else {
- if (startMinutes < o.startMinutes) {
- return -1;
- } else if (startMinutes > o.startMinutes) {
- return 1;
- }
- }
-
- return 0;
- }
-
- public int getDayOfWeek() {
- return zeroBasedDayOfWeek;
- }
-
- public String getDescription() {
- return DAYS[zeroBasedDayOfWeek] + " " + getHrsMins(startMinutes) + "-"
- + getHrsMins(endMinutes);
- }
-
- public int getEndMinutes() {
- return endMinutes;
- }
-
- public int getStartMinutes() {
- return startMinutes;
- }
-
- public void setDayOfWeek(int zeroBasedDayOfWeek) {
- if (0 <= zeroBasedDayOfWeek && zeroBasedDayOfWeek < 7) {
- this.zeroBasedDayOfWeek = zeroBasedDayOfWeek;
- } else {
- throw new IllegalArgumentException("day must be in the range 0-6");
- }
- }
-
- public void setEndMinutes(int endMinutes) {
- this.endMinutes = endMinutes;
- }
-
- public void setStartMinutes(int startMinutes) {
- this.startMinutes = startMinutes;
- }
-
- private String getHrsMins(int mins) {
- int hrs = mins / 60;
- if (hrs > 12) {
- hrs -= 12;
- }
-
- int remainder = mins % 60;
-
- return hrs + ":"
- + (remainder < 10 ? "0" + remainder : String.valueOf(remainder));
- }
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/legacyPublic/DynaTable2Legacy.css b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/legacyPublic/DynaTable2Legacy.css
deleted file mode 100644
index ab81abf..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/legacyPublic/DynaTable2Legacy.css
+++ /dev/null
@@ -1,85 +0,0 @@
-
-body {
- background-color: white;
- color: black;
- font-family: Arial, sans-serif;
- font-size: small;
- margin: 8px;
- margin-top: 3px;
-}
-
-.DynaTable-DynaTableWidget {
- width: 100%;
- border: 1px solid #ACA899;
-}
-
-
-.DynaTable-DynaTableWidget .navbar {
- width: 100%;
- background-color: #ECE9D8;
- vertical-align: middle;
- border-bottom: 1px solid #ACA899;
-}
-
-.DynaTable-DynaTableWidget .navbar button {
- width: 3em;
- text-align: center;
- vertical-align: middle;
-}
-
-.DynaTable-DynaTableWidget .navbar .status {
- vertical-align: middle;
- padding-right: 10px;
-}
-
-.DynaTable-DynaTableWidget .table {
- margin: 10px;
-}
-
-.DynaTable-DynaTableWidget .table td.header {
- text-align: left;
- font-weight: bold;
- text-decoration: underline;
-}
-
-.DynaTable-DynaTableWidget .table td.name {
- width: 10em;
-}
-
-.DynaTable-DynaTableWidget .table td.desc {
- width: 20em;
-}
-
-.DynaTable-DynaTableWidget .table td.sched {
- width: 20em;
-}
-
-.DynaTable-DynaTableWidget .table td {
- vertical-align: top;
-}
-
-.DynaTable-DayFilterWidget {
- margin: 3em 1em 1em 0;
- width: 10em;
- padding: 0px 8px 0px 8px;
- border: 1px solid #ACA899;
-}
-
-.DynaTable-DayFilterWidget button {
- width: 4em;
- margin: 8px 4px 8px 4px;
-}
-
-.DynaTable-ErrorDialog {
- border: 2px outset;
- background-color: white;
- width: 50%;
-}
-
-.DynaTable-ErrorDialog .Caption {
- background-color: #C3D9FF;
- padding: 3px;
- margin: 2px;
- font-weight: bold;
- cursor: default;
-}
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/legacyPublic/DynaTable2Legacy.html b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/legacyPublic/DynaTable2Legacy.html
deleted file mode 100644
index 3c5887a..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/legacyPublic/DynaTable2Legacy.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!-- -->
-<!-- Copyright 2008 Google Inc. -->
-<!-- Licensed under the Apache License, Version 2.0 (the "License"); you -->
-<!-- may not use this file except in compliance with the License. You may -->
-<!-- may obtain a copy of the License at -->
-<!-- -->
-<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
-<!-- -->
-<!-- Unless required by applicable law or agreed to in writing, software -->
-<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
-<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -->
-<!-- implied. License for the specific language governing permissions and -->
-<!-- limitations under the License. -->
-
-<html>
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8">
- <link type="text/css" rel="stylesheet" href="DynaTable2Legacy.css">
- <title></title>
- </head>
- <body>
- <iframe src="javascript:''" id='__gwt_historyFrame' tabIndex='-1' style='width:0;height:0;border:0'></iframe>
- <script type="text/javascript" language='javascript' src='com.google.gwt.sample.dynatable2.DynaTable2Legacy.nocache.js'></script>
- <h1>School Schedule for Professors and Students</h1>
- <table width="100%" border="0" summary="School Schedule for Professors and Students">
- <tr valign="top">
- <td id="calendar" align="center" width="90%">
- </td>
- <td id="days" align="center" width="10%">
- </td>
- </tr>
- </table>
- </body>
-</html>
diff --git a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/server/SchoolCalendarServiceImpl.java b/samples/dynatable2/src/com/google/gwt/sample/dynatable2/server/SchoolCalendarServiceImpl.java
deleted file mode 100644
index 2705edb..0000000
--- a/samples/dynatable2/src/com/google/gwt/sample/dynatable2/server/SchoolCalendarServiceImpl.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Copyright 2007 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.sample.dynatable2.server;
-
-import com.google.gwt.sample.dynatable2.client.Person;
-import com.google.gwt.sample.dynatable2.client.Professor;
-import com.google.gwt.sample.dynatable2.client.Schedule;
-import com.google.gwt.sample.dynatable2.client.SchoolCalendarService;
-import com.google.gwt.sample.dynatable2.client.Student;
-import com.google.gwt.sample.dynatable2.client.TimeSlot;
-import com.google.gwt.user.server.rpc.RemoteServiceServlet;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Random;
-
-/**
- * The implementation of the RPC service which runs on the server.
- */
-public class SchoolCalendarServiceImpl extends RemoteServiceServlet implements
- SchoolCalendarService {
-
- private static final String[] FIRST_NAMES = new String[] {
- "Inman", "Sally", "Omar", "Teddy", "Jimmy", "Cathy", "Barney", "Fred",
- "Eddie", "Carlos"};
-
- private static final String[] LAST_NAMES = new String[] {
- "Smith", "Jones", "Epps", "Gibbs", "Webber", "Blum", "Mendez",
- "Crutcher", "Needler", "Wilson", "Chase", "Edelstein"};
-
- private static final String[] SUBJECTS = new String[] {
- "Chemistry", "Phrenology", "Geometry", "Underwater Basket Weaving",
- "Basketball", "Computer Science", "Statistics", "Materials Engineering",
- "English Literature", "Geology"};
-
- private static final Person[] NO_PEOPLE = new Person[0];
-
- private static final int CLASS_LENGTH_MINS = 50;
-
- private static final int MAX_SCHED_ENTRIES = 5;
-
- private static final int MIN_SCHED_ENTRIES = 1;
-
- private static final int MAX_PEOPLE = 100;
-
- private static final int STUDENTS_PER_PROF = 5;
-
- private final List<Person> people = new ArrayList<Person>();
-
- private final Random rnd = new Random(3);
-
- public SchoolCalendarServiceImpl() {
- generateRandomPeople();
- }
-
- public Person[] getPeople(int startIndex, int maxCount) {
- int peopleCount = people.size();
-
- int start = startIndex;
- if (start >= peopleCount) {
- return NO_PEOPLE;
- }
-
- int end = Math.min(startIndex + maxCount, peopleCount);
- if (start == end) {
- return NO_PEOPLE;
- }
-
- int resultCount = end - start;
- Person[] results = new Person[resultCount];
- for (int from = start, to = 0; to < resultCount; ++from, ++to) {
- results[to] = people.get(from);
- }
-
- return results;
- }
-
- /**
- * Write the serialized response out to stdout. This is a very unusual thing
- * to do, but it allows us to create a static file version of the response
- * without deploying a servlet.
- */
- @Override
- protected void onAfterResponseSerialized(String serializedResponse) {
- System.out.println(serializedResponse);
- }
-
- private void generateRandomPeople() {
- for (int i = 0; i < MAX_PEOPLE; ++i) {
- Person person = generateRandomPerson();
- people.add(person);
- }
- }
-
- private Person generateRandomPerson() {
- // 1 out of every so many people is a prof.
- //
- if (rnd.nextInt(STUDENTS_PER_PROF) == 1) {
- return generateRandomProfessor();
- } else {
- return generateRandomStudent();
- }
- }
-
- private Person generateRandomProfessor() {
- Professor prof = new Professor();
-
- String firstName = pickRandomString(FIRST_NAMES);
- String lastName = pickRandomString(LAST_NAMES);
- prof.setName("Dr. " + firstName + " " + lastName);
-
- String subject = pickRandomString(SUBJECTS);
- prof.setDescription("Professor of " + subject);
-
- generateRandomSchedule(prof.getTeachingSchedule());
-
- return prof;
- }
-
- private void generateRandomSchedule(Schedule sched) {
- int range = MAX_SCHED_ENTRIES - MIN_SCHED_ENTRIES + 1;
- int howMany = MIN_SCHED_ENTRIES + rnd.nextInt(range);
-
- TimeSlot[] timeSlots = new TimeSlot[howMany];
-
- for (int i = 0; i < howMany; ++i) {
- int startHrs = 8 + rnd.nextInt(9); // 8 am - 5 pm
- int startMins = 15 * rnd.nextInt(4); // on the hour or some quarter
- int dayOfWeek = 1 + rnd.nextInt(5); // Mon - Fri
-
- int absStartMins = 60 * startHrs + startMins; // convert to minutes
- int absStopMins = absStartMins + CLASS_LENGTH_MINS;
-
- timeSlots[i] = new TimeSlot(dayOfWeek, absStartMins, absStopMins);
- }
-
- Arrays.sort(timeSlots);
-
- for (int i = 0; i < howMany; ++i) {
- sched.addTimeSlot(timeSlots[i]);
- }
- }
-
- private Person generateRandomStudent() {
- Student student = new Student();
-
- String firstName = pickRandomString(FIRST_NAMES);
- String lastName = pickRandomString(LAST_NAMES);
- student.setName(firstName + " " + lastName);
-
- String subject = pickRandomString(SUBJECTS);
- student.setDescription("Majoring in " + subject);
-
- generateRandomSchedule(student.getClassSchedule());
-
- return student;
- }
-
- private String pickRandomString(String[] a) {
- int i = rnd.nextInt(a.length);
- return a[i];
- }
-}