Permalink
Browse files

adding next Demo sources

  • Loading branch information...
1 parent f990c42 commit 6d03e3a44bb8e6bfa7a6add9b90ff3d3248bdaca next Interfaces committed Jul 29, 2011
Showing with 3,349 additions and 0 deletions.
  1. +8 −0 .classpath
  2. +28 −0 .project
  3. +6 −0 .settings/com.google.gdt.eclipse.core.prefs
  4. +5 −0 .settings/com.google.gwt.eclipse.core.prefs
  5. +4 −0 .settings/org.eclipse.jdt.ui.prefs
  6. +144 −0 build.xml
  7. +12 −0 src/next/demo.gwt.xml
  8. +22 −0 src/next/interfaces/Globals.java
  9. +68 −0 src/next/interfaces/Main.java
  10. +56 −0 src/next/interfaces/controller/DemoUtils.java
  11. +48 −0 src/next/interfaces/controller/DemoWidgetsController.java
  12. +61 −0 src/next/interfaces/controller/DemoXController.java
  13. +48 −0 src/next/interfaces/controller/GitXController.java
  14. +37 −0 src/next/interfaces/controller/GitXTableController.java
  15. +33 −0 src/next/interfaces/controller/HelloWorldController.java
  16. +34 −0 src/next/interfaces/controller/TestTableCtrl.java
  17. +54 −0 src/next/interfaces/controller/animation/FadeController.java
  18. +55 −0 src/next/interfaces/controller/animation/FlipController.java
  19. +54 −0 src/next/interfaces/controller/animation/PopController.java
  20. +53 −0 src/next/interfaces/controller/animation/SlideController.java
  21. +59 −0 src/next/interfaces/controller/animation/SlideUpDownController.java
  22. +55 −0 src/next/interfaces/controller/animation/SwapController.java
  23. +82 −0 src/next/interfaces/controller/animation/TransitionsController.java
  24. +78 −0 src/next/interfaces/controller/widgets/ButtonsController.java
  25. +87 −0 src/next/interfaces/controller/widgets/CheckboxController.java
  26. +58 −0 src/next/interfaces/controller/widgets/FormController.java
  27. +54 −0 src/next/interfaces/controller/widgets/LabelImageController.java
  28. +58 −0 src/next/interfaces/controller/widgets/PickerController.java
  29. +74 −0 src/next/interfaces/controller/widgets/ProgressController.java
  30. +80 −0 src/next/interfaces/controller/widgets/RadioButtonController.java
  31. +66 −0 src/next/interfaces/controller/widgets/SliderController.java
  32. +56 −0 src/next/interfaces/controller/widgets/SwitchController.java
  33. +105 −0 src/next/interfaces/controller/widgets/WidgetsController.java
  34. +59 −0 src/next/interfaces/views/CustomListController.java
  35. +70 −0 src/next/interfaces/views/ListsController.java
  36. +87 −0 src/next/interfaces/views/NavigationBarController.java
  37. +52 −0 src/next/interfaces/views/SimpleListController.java
  38. +77 −0 src/next/interfaces/views/SlideController.java
  39. BIN war/WEB-INF/lib/gwt-servlet.jar
  40. BIN war/WEB-INF/lib/next.jar
  41. +12 −0 war/WEB-INF/web.xml
  42. BIN war/images/chevron.png
  43. BIN war/images/chevronSelected.png
  44. BIN war/images/icons/apple-touch-icon-114.png
  45. BIN war/images/icons/apple-touch-icon-72.png
  46. BIN war/images/icons/apple-touch-icon.png
  47. BIN war/images/icons/bgSample0.png
  48. BIN war/images/icons/bgSample1.png
  49. BIN war/images/icons/bgSample2.png
  50. BIN war/images/icons/cursor.png
  51. BIN war/images/icons/earth.jpg
  52. BIN war/images/icons/next-logo-16.png
  53. BIN war/images/icons/next-logo-white.png
  54. BIN war/images/icons/next-logo.png
  55. BIN war/images/icons/tab0-selected.png
  56. BIN war/images/icons/tab0.png
  57. BIN war/images/icons/tab1-selected.png
  58. BIN war/images/icons/tab1.png
  59. BIN war/images/icons/tab3-selected.png
  60. BIN war/images/icons/tab3.png
  61. BIN war/images/icons/tab4-selected.png
  62. BIN war/images/icons/tab4.png
  63. BIN war/images/navigationButton.png
  64. BIN war/images/navigationButtonBack.png
  65. BIN war/images/navigationButtonBackSelected.png
  66. BIN war/images/navigationButtonHighlighted.png
  67. BIN war/images/navigationButtonHighlightedRight.png
  68. BIN war/images/navigationButtonRight.png
  69. BIN war/images/navigationButtonRightSelected.png
  70. BIN war/images/navigationButtonSelected.png
  71. BIN war/images/navigationContent.png
  72. BIN war/images/xbuttonAdd.png
  73. BIN war/images/xbuttonAddSelected.png
  74. BIN war/images/xbuttonDisclosure.png
  75. BIN war/images/xbuttonDisclosureSelected.png
  76. BIN war/images/xbuttonInfoDark.png
  77. BIN war/images/xbuttonInfoDarkSelected.png
  78. BIN war/images/xbuttonInfoLight.png
  79. BIN war/images/xbuttonInfoLightSelected.png
  80. BIN war/images/xcheckbox-selected.png
  81. BIN war/images/xcheckbox.png
  82. BIN war/images/xpicker.png
  83. BIN war/images/xradiobutton-selected.png
  84. BIN war/images/xradiobutton.png
  85. BIN war/images/xsliderThumb.png
  86. BIN war/images/xswitch.png
  87. +39 −0 war/index.html
  88. +1,158 −0 war/style.css
  89. +53 −0 war/test.html
View
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/next"/>
+ <classpathentry kind="output" path="war/WEB-INF/classes"/>
+</classpath>
View
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>next-Demo</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>com.google.gwt.eclipse.core.gwtNature</nature>
+ </natures>
+</projectDescription>
@@ -0,0 +1,6 @@
+#Thu Jun 09 08:36:45 PDT 2011
+eclipse.preferences.version=1
+jarsExcludedFromWebInfLib=
+launchConfigExternalUrlPrefix=
+warSrcDir=war
+warSrcDirIsOutput=true
@@ -0,0 +1,5 @@
+#Thu Jul 28 17:38:36 PDT 2011
+eclipse.preferences.version=1
+entryPointModules=
+filesCopiedToWebInfLib=gwt-servlet.jar
+gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+SU5GTzwvbG9nLWxldmVsPjxvdXRwdXQtc3R5bGU+T0JGVVNDQVRFRDwvb3V0cHV0LXN0eWxlPjxleHRyYS1hcmdzPjwhW0NEQVRBW11dPjwvZXh0cmEtYXJncz48dm0tYXJncz48IVtDREFUQVstWG14NTEybV1dPjwvdm0tYXJncz48ZW50cnktcG9pbnQtbW9kdWxlPm5leHQuZGVtbzwvZW50cnktcG9pbnQtbW9kdWxlPjwvZ3d0LWNvbXBpbGUtc2V0dGluZ3M+
@@ -0,0 +1,4 @@
+#Thu May 26 08:49:27 PDT 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*\n * Copyright 2011 Vancouver Ywebb Consulting Ltd\n * \n * Licensed under the Apache License, Version 2.0 (the "License"); you may not\n * use this file except in compliance with the License. You may obtain a copy of\n * the License at\n * \n * http\://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */\n${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
View
144 build.xml
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project basedir="." default="dist" name="next-demo">
+
+ <property name="debuglevel" value="source,lines,vars" />
+ <property name="target" value="1.5" />
+ <property name="source" value="1.5" />
+ <property name="build.root.dir" value="build" />
+ <property name="build.dir" value="build/classes" />
+ <property name="dist.dir" value="demo" />
+ <property name="war.dir" value="war" />
+
+ <path id="java.classpath">
+ <pathelement location="${build.dir}" />
+ <fileset dir="war/WEB-INF/lib/gwt.sdk">
+ <include name="**/*.jar" />
+ </fileset>
+ <fileset dir="war/WEB-INF/lib">
+ <include name="**/*.jar" />
+ </fileset>
+ </path>
+
+ <path id="gwt.classpath">
+ <pathelement location="src" />
+ <path refid="java.classpath" />
+ </path>
+
+ <!-- ===================================================================
+ macrodef: set.timestamp
+ ==================================================================== -->
+ <macrodef name="set.timestamp">
+ <sequential>
+ <tstamp>
+ <format property="current.time" pattern="MMddhhmm" />
+ </tstamp>
+ </sequential>
+ </macrodef>
+
+ <!-- ===================================================================
+ target: init
+ ==================================================================== -->
+ <target name="init" depends="clean, prepare">
+ <set.timestamp />
+ <copy includeemptydirs="false" todir="${build.dir}">
+ <fileset dir="src">
+ <exclude name="**/*.launch" />
+ <exclude name="**/*" />
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- ===================================================================
+ target: clean
+ ==================================================================== -->
+ <target name="clean">
+ <delete dir="${build.root.dir}" />
+ <delete dir="${dist.dir}" />
+ </target>
+
+ <!-- ===================================================================
+ target: prepare
+ ==================================================================== -->
+ <target name="prepare" description="creates output directories">
+ <mkdir dir="${build.dir}" />
+ <mkdir dir="${dist.dir}" />
+ </target>
+
+ <!-- ===================================================================
+ target: build
+ ==================================================================== -->
+ <target name="build" depends="">
+ <echo message="${ant.project.name}: ${ant.file}" />
+ </target>
+
+ <!-- ===================================================================
+ target: compile.java
+ ==================================================================== -->
+ <target name="compile" depends="init" description="compiles Java sources">
+ <javac debug="true" debuglevel="${debuglevel}" destdir="${build.dir}" source="${source}" target="${target}">
+ <src path="src" />
+ <classpath refid="java.classpath" />
+ <compilerarg value="-Xlint:-unchecked" />
+ </javac>
+ </target>
+
+ <!-- ===================================================================
+ target: compile.gwt
+ ==================================================================== -->
+ <target name="compile.gwt" depends="compile" description="compiles GWT sources to JavaScript">
+ <java classname="com.google.gwt.dev.Compiler" maxmemory="1024M" fork="yes" failonerror="true">
+ <classpath refid="gwt.classpath" />
+ <arg line="-war ${dist.dir}" />
+ <arg line="-style OBFUSCATE" />
+ <arg line="-localWorkers 2" />
+ <arg value="next.interfaces" />
+ <jvmarg value="-Xss2048k" />
+ </java>
+
+
+ <!-- cleanup -->
+ <delete dir="${build.root.dir}" />
+
+ <!-- cleanup WEB-INF retain if you have RPC servlets -->
+ <delete dir="${dist.dir}/WEB-INF" />
+ </target>
+
+ <!-- ===================================================================
+ target: dist
+ ==================================================================== -->
+ <target name="dist" depends="compile.gwt" description="dists the artifacts">
+
+ <copy todir="${dist.dir}">
+ <fileset dir="${war.dir}">
+ <include name="*.html" />
+ <include name="*.css" />
+ <include name="*.xml" />
+ </fileset>
+ </copy>
+ <copy todir="${dist.dir}/images">
+ <fileset dir="${war.dir}/images">
+ <include name="**/*.*" />
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- ===================================================================
+ target: zip
+ ==================================================================== -->
+ <target name="zip" depends="" description="zips the artifacts">
+
+ <delete file="next-demo.zip" />
+
+ <zip destfile="next-demo.zip" basedir=".">
+ <!--
+ <exclude name="**/WEB-INF/lib"/>
+ <exclude name="**/WEB-INF/lib/gwt.sdk/*.jar"/>
+ <exclude name="**/WEB-INF/lib/gwt-servlet.jar"/>
+ <exclude name="**/WEB-INF/classes/*.*"/>
+ <exclude name="**/WEB-INF/deploy/*.*"/>
+ -->
+ </zip>
+
+ </target>
+
+</project>
View
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module rename-to='nextdemo'>
+
+ <inherits name='com.google.gwt.user.User' />
+
+ <inherits name='next.interfaces' />
+
+ <entry-point class='next.interfaces.Main' />
+
+ <source path='interfaces' />
+
+</module>
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2011 Vancouver Ywebb Consulting Ltd
+ *
+ * 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 next.interfaces;
+
+public interface Globals {
+
+ String GIT_HOST = "https://github.com/ywebb/gwt-touch-demo/blob/master/src/next/demo";
+
+}
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2011 Vancouver Ywebb Consulting Ltd
+ *
+ * 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 next.interfaces;
+
+/**
+ * Main entry point class
+ * @author Atanas Roussev
+ */
+import next.i.controller.XNavigationController;
+import next.i.controller.XTabBarController;
+import next.i.controller.XTabController;
+import next.interfaces.controller.DemoWidgetsController;
+import next.interfaces.controller.animation.TransitionsController;
+import next.interfaces.controller.widgets.WidgetsController;
+
+import com.google.gwt.core.client.EntryPoint;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.RootLayoutPanel;
+import com.google.gwt.user.client.ui.RootPanel;
+
+public class Main implements EntryPoint {
+
+ public void onModuleLoad() {
+
+ RootLayoutPanel.get().getElement().setId("rootLayoutPanel");
+
+ XTabController tabAnimeCtrl = new XTabController(new XNavigationController(new TransitionsController()));
+ tabAnimeCtrl.set("Animations", new Image("images/icons/tab0.png"),
+ new Image("images/icons/tab0-selected.png"));
+
+ XTabController tabWidgetsCtrl = new XTabController(new XNavigationController(new WidgetsController()));
+ tabWidgetsCtrl.set("Widgets", new Image("images/icons/tab3.png"),
+ new Image("images/icons/tab3-selected.png"));
+
+ XTabController tabThemesCtrl = new XTabController(new DemoWidgetsController("Themes", "images/icons/bgSample1.png"));
+ tabThemesCtrl.set("Themes", new Image("images/icons/tab4.png"), new Image("images/icons/tab4-selected.png"));
+
+// XTabController tabListCtrl = new XTabController(new XNavigationController(new ListsController()));
+// tabListCtrl.set("Lists", new Image("images/icons/tab1.png"), new Image("images/icons/tab1-selected.png"));
+
+ XTabBarController tabBarController = new XTabBarController();
+ tabBarController.addControllers( tabWidgetsCtrl, tabAnimeCtrl);
+
+ RootPanel.get("loading").setVisible(false);
+
+
+// TextArea _textArea = new TextArea();
+// _textArea.setText("qqqqq\noooo");
+// RootPanel.get().add(_textArea);
+//
+// TextBox _textBox = new TextBox();
+// _textArea.setText("11111");
+// RootPanel.get().add(_textBox);
+ }
+}
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2011 Vancouver Ywebb Consulting Ltd
+ *
+ * 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 next.interfaces.controller;
+
+
+import java.util.ArrayList;
+
+import next.i.util.Utils;
+import next.interfaces.Globals;
+
+
+public class DemoUtils {
+
+ public static String[] DATA;
+
+ static {
+ DATA = populate();
+ }
+
+ private static String[] populate() {
+ ArrayList<String> list = new ArrayList<String>();
+ for (int i = 0; i < 31; i++) {
+ list.add(i + " list item");
+ }
+
+ String[] arr = new String[list.size()];
+ for (int i = 0; i < list.size(); i++) {
+ arr[i] = list.get(i);
+ }
+
+ return arr;
+ }
+
+ public static native void openURL(String url)/*-{
+ $wnd.open(url, 'target=_blank');
+ }-*/;
+
+ public static void openGit(String url) {
+ Utils.loadUrl(Globals.GIT_HOST + url + ".java");
+ // openURL(Globals.GIT_HOST + url + ".java");
+ };
+
+}
Oops, something went wrong.

0 comments on commit 6d03e3a

Please sign in to comment.