aboutsummaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorManolo Carrasco <manolo@apache.org>2011-04-05 08:16:39 +0000
committerManolo Carrasco <manolo@apache.org>2011-04-05 08:16:39 +0000
commit0b419887ee438eb524c6873f63b1d961f8a0c612 (patch)
tree1645961f18a2e8cc3923a7fe32941bd316341990 /samples
parentcde651099d68146fe3cc7a379a32ce2b438888e1 (diff)
downloadgwtquery-0b419887ee438eb524c6873f63b1d961f8a0c612.tar.gz
gwtquery-0b419887ee438eb524c6873f63b1d961f8a0c612.zip
moved gwt widgets from gwtquery to gquery enhance plugin
Diffstat (limited to 'samples')
-rw-r--r--samples/src/main/java/gwtquery/samples/GwtQueryWidgets.gwt.xml6
-rw-r--r--samples/src/main/java/gwtquery/samples/client/GwtQueryWidgetModule.java122
-rw-r--r--samples/src/main/java/gwtquery/samples/public/GwtQueryWidgets.html199
-rw-r--r--samples/src/main/webapp/index.html19
4 files changed, 10 insertions, 336 deletions
diff --git a/samples/src/main/java/gwtquery/samples/GwtQueryWidgets.gwt.xml b/samples/src/main/java/gwtquery/samples/GwtQueryWidgets.gwt.xml
deleted file mode 100644
index 014b421b..00000000
--- a/samples/src/main/java/gwtquery/samples/GwtQueryWidgets.gwt.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<module>
- <inherits name='com.google.gwt.query.Query'/>
- <inherits name='com.google.gwt.user.theme.chrome.Chrome' />
- <entry-point class='gwtquery.samples.client.GwtQueryWidgetModule'/>
-</module>
-
diff --git a/samples/src/main/java/gwtquery/samples/client/GwtQueryWidgetModule.java b/samples/src/main/java/gwtquery/samples/client/GwtQueryWidgetModule.java
deleted file mode 100644
index 8faa5cf9..00000000
--- a/samples/src/main/java/gwtquery/samples/client/GwtQueryWidgetModule.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright 2011, The gwtquery team.
- *
- * 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 gwtquery.samples.client;
-
-import static com.google.gwt.query.client.GQuery.$;
-import static com.google.gwt.query.client.plugins.Widgets.Widgets;
-
-import com.google.gwt.core.client.EntryPoint;
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.dom.client.Element;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.query.client.plugins.widgets.WidgetInitializer;
-import com.google.gwt.query.client.plugins.widgets.ListBoxWidgetFactory.ListBoxOptions;
-import com.google.gwt.query.client.plugins.widgets.SuggestBoxWidgetFactory.SuggestBoxOptions;
-import com.google.gwt.query.client.plugins.widgets.TabPanelWidgetFactory.TabPanelOptions;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.DisclosurePanel;
-import com.google.gwt.user.client.ui.GqUi;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.PopupPanel;
-import com.google.gwt.user.client.ui.RootPanel;
-import com.google.gwt.user.client.ui.Tree;
-import com.google.gwt.user.client.ui.TreeItem;
-import com.google.gwt.user.client.ui.Widget;
-
-import java.util.Iterator;
-
-public class GwtQueryWidgetModule implements EntryPoint {
-
- public static class MyButtonInitializer implements WidgetInitializer<Button> {
-
- public void initialize(Button button, Element e) {
-
- final String tag = e.getTagName();
- button.addClickHandler(new ClickHandler() {
-
- public void onClick(ClickEvent event) {
- Label l = new Label("You click on a GWT Button create from a " + tag);
- PopupPanel panel = new PopupPanel(true, true);
- panel.setGlassEnabled(true);
- panel.add(l);
- panel.center();
-
- }
- });
-
- }
- }
-
- public void onModuleLoad() {
-
- $("#disclosure").as(Widgets).disclosurePanel();
-
- $(".inputText").as(Widgets).textBox();
- $(".inputPsw").as(Widgets).passwordBox();
- $(".textArea").as(Widgets).textArea();
-
- $(".btn").as(Widgets).button(new MyButtonInitializer());
-
- $("#tabs").as(Widgets).tabPanel(
- new TabPanelOptions("div.tab", "h3.tabTitle"));
- //$(".editable").as(Widgets).richtext().widget();
-
- $(".date").as(Widgets).datebox();
-
- $(".list").as(Widgets).listBox();
- $("#multiSelect").as(Widgets).listBox(new ListBoxOptions(".item", true));
- $("#suggestBox1").as(Widgets).suggestBox(new SuggestBoxOptions("div"));
- $("#suggestBox2").as(Widgets).suggestBox(new SuggestBoxOptions("li"));
- $(".stack").as(Widgets).stackPanel();
- $(".checkBox").as(Widgets).checkBox();
- $(".radio").as(Widgets).radioButton();
-
- $("body > div").as(Widgets).decoratorPanel();
-
- GWT.log("Found " + $(".btn").widgets().size() + " buttons widget");
-
- displayWidgetHierarchy();
- }
-
- private void displayWidgetHierarchy() {
- DisclosurePanel disclosurePanel = $("#disclosure").widget();
- Tree widgetHierarchy = new Tree();
- TreeItem rootItem = new TreeItem(disclosurePanel.getClass().getName());
- widgetHierarchy.addItem(rootItem);
- widgetHierarchy.setAnimationEnabled(true);
- addChildren(rootItem, disclosurePanel);
-
- RootPanel.get().add(new Label("Widgets hierarchy :"));
- RootPanel.get().add(widgetHierarchy);
- }
-
- private void addChildren(TreeItem item, Widget w) {
- Iterator<Widget> children = GqUi.getChildren(w);
- if (children != null) {
- while (children.hasNext()) {
- Widget child = children.next();
- TreeItem subItem = new TreeItem(child.getClass().getName());
- item.addItem(subItem);
-
- addChildren(subItem, child);
-
- }
- }
-
- }
-
-}
diff --git a/samples/src/main/java/gwtquery/samples/public/GwtQueryWidgets.html b/samples/src/main/java/gwtquery/samples/public/GwtQueryWidgets.html
deleted file mode 100644
index 0a6eb9d5..00000000
--- a/samples/src/main/java/gwtquery/samples/public/GwtQueryWidgets.html
+++ /dev/null
@@ -1,199 +0,0 @@
-<html>
-<head>
-<title>GQuery Demo</title>
-<script language="javascript"
- src="gwtquery.samples.GwtQueryWidgets.nocache.js" ></script>
-<style type="text/css">
-.outer {
- margin: 5px;
-}
-</style>
-</head>
-<body>
-
-<div class="outer">
-<div id="disclosure">
-<h3>Show the widgets</h3>
-<div>
- <div id="tabs">
-
- <h3 class="tabTitle">Buttons</h3>
- <div class="tab">
- <div class="outer">
- <div class="btn">Make me a button 1!</div>
- <a class="btn">Make me a button 2!</a>
- <span class="btn">Make me a button 3!</span>
- <button class="btn">Make me a button 4!</button>
- <div class="btn">Make me a button 5!</div>
- <div class="btn">Make me a button 6!</div>
- </div>
- </div>
-
- <h3 class="tabTitle">Inputs</h3>
-
- <div class="tab">
- <input type="text" class="date"
- value="dd/MM/yyyy" />
-
- <div class="outer">
- <div class="inputText">I will be a text input</div>
- <span class="inputText">I will be a text input</span>
- <input
- class="inputText" type="text" value="I will be a text input"></input>
- </div>
-
- <div class="outer">
- <div class="inputPsw">I will be an password input</div>
- <span class="inputPsw">I will be an password input</span>
- <input
- class="inputPsw" type="password" value="I will be an password input"></input>
- </div>
- <input type="text" class="date" value="dd/MM/yyyy" />
-
- <div class="outer">
- <div class="textArea">I will be a text area</div>
- <span class="textArea">I will be a text area</span>
- <textarea class="textArea">I will be a text area</textarea>
- </div>
-
- <div class="outer">
- <div id="suggestBox1">
- <div>suggestion a</div>
- <div>suggestion b</div>
- <div>suggestion c</div>
- <div>suggestion d</div>
- <div>suggestion e</div>
- <div>suggestion f</div>
- <div>suggestion g</div>
- <div>suggestion h</div>
- <div>suggestion i</div>
- <div>suggestion j</div>
- <div>suggestion k</div>
- <div>suggestion l</div>
- <div>suggestion m</div>
- <div>suggestion n</div>
- <div>suggestion o</div>
- <div>suggestion p</div>
- <div>suggestion q</div>
- <div>suggestion r</div>
- <div>suggestion s</div>
- <div>suggestion t</div>
- <div>suggestion u</div>
- <div>suggestion v</div>
- <div>suggestion w</div>
- <div>suggestion x</div>
- <div>suggestion y</div>
- <div>suggestion z</div>
- </div>
-
- <ul id="suggestBox2">
- <li>suggestion a</li>
- <li>suggestion b</li>
- <li>suggestion c</li>
- <li>suggestion d</li>
- <li>suggestion e</li>
- <li>suggestion f</li>
- <li>suggestion g</li>
- <li>suggestion h</li>
- <li>suggestion i</li>
- <li>suggestion j</li>
- <li>suggestion k</li>
- <li>suggestion l</li>
- <li>suggestion m</li>
- <li>suggestion n</li>
- <li>suggestion o</li>
- <li>suggestion p</li>
- <li>suggestion q</li>
- <li>suggestion r</li>
- <li>suggestion s</li>
- <li>suggestion t</li>
- <li>suggestion u</li>
- <li>suggestion v</li>
- <li>suggestion w</li>
- <li>suggestion x</li>
- <li>suggestion y</li>
- <li>suggestion z</li>
- </ul>
-
- <div class="outer">
- <div class="checkBox">Checkbox</div>
- <div class="checkBox">created</div>
- <div class="checkBox">from div</div>
- </div>
-
- <div class="outer">
- <div class="radio">RadioButton</div>
- <div class="radio">created</div>
- <div class="radio">from div</div>
- </div>
- </div>
-
-
- </div>
-
- <h3 class="tabTitle">Normal Tab</h3>
- <div class="tab">Pellentesque habitant morbi tristique senectus et netus et
- malesuada fames ac turpis egestas. Duis feugiat dapibus nunc, sit amet
- sodales dolor bibendum eget. Pellentesque ac libero et nibh ultrices
- vehicula. Morbi convallis auctor ultricies. Class aptent taciti sociosqu
- ad litora torquent per conubia nostra, per inceptos himenaeos. Aenean
- gravida eros at massa fringilla vestibulum. Sed justo dui, euismod et
- venenatis in, vehicula ut nisi. Sed sodales lorem vel est luctus vitae
- ornare erat pulvinar. Maecenas lacus sem, ultrices vitae tincidunt in,
- gravida eget quam. Vestibulum condimentum, augue nec consectetur
- egestas, mi sapien ullamcorper diam, sit amet molestie mauris odio at
- lacus.</div>
-
- <h3 class="tabTitle">SelectBoxes</h3>
- <div class="tab">
- <div class="outer">
- <select class="list">
- <option>option 11</option>
- <option>option 12</option>
- <option>option 13</option>
- <option>option 14</option>
- </select>
-
- <ul class="list">
- <li>option 21</li>
- <li>option 22</li>
- <li>option 23</li>
- <li>option 23</li>
- </ul>
-
- <div class="list">
- <div>div 1</div>
- <div>div 2</div>
- <span>span 1</span>
- <span>span 1</span>
- </div>
-
- <div id="multiSelect">
- <div>div 1</div>
- <div class="item">div 2</div>
- <span>span 1</span>
- <span class="item">span 1</span>
- </div>
- </div>
- </div>
-
- <h3 class="tabTitle">StackPanel</h3>
- <div class="tab">
- <div class="stack">
- <h3>header 1</h3>
- <div> content 1</div>
-
- <h3>header 2</h3>
- <div> content 2</div>
-
- <h3>header 3</h3>
- <div> content 3</div>
- </div>
- </div>
- </div>
- </div>
-</div>
-</div>
-
-</body>
-</html>
diff --git a/samples/src/main/webapp/index.html b/samples/src/main/webapp/index.html
index 25cd7f3e..743cda7c 100644
--- a/samples/src/main/webapp/index.html
+++ b/samples/src/main/webapp/index.html
@@ -11,15 +11,16 @@
}
</script>
<ul>
-<li><a href="javascript:goTo('gwtquery.samples.GwtQuerySample/GwtQuerySample.html')">gwtquery.samples.GwtQuerySample/GwtQuerySample.html</a></li>
-<li><a href="javascript:goTo('gwtquery.samples.GwtQueryDemo/GwtQueryDemo.html')">gwtquery.samples.GwtQueryDemo/GwtQueryDemo.html</a></li>
-<li><a href="javascript:goTo('gwtquery.samples.GwtQueryEffects/GwtQueryEffects.html')">gwtquery.samples.GwtQueryEffects/GwtQueryEffects.html</a></li>
-<li><a href="javascript:goTo('gwtquery.samples.GwtQueryEffectsMin/GwtQueryEffectsMin.html')">gwtquery.samples.GwtQueryEffects/GwtQueryEffectsMin.html</a></li>
-<li><a href="javascript:goTo('gwtquery.samples.GwtQueryWidgets/GwtQueryWidgets.html')">gwtquery.samples.GwtQueryWidgets/GwtQueryWidgets.html</a></li>
-<li><a href="javascript:goTo('gwtquery.samples.GwtQueryBench/GwtQueryBench.html')">gwtquery.samples.GwtQueryBench/GwtQueryBench.html</a></li>
-<li><a href="javascript:goTo('gwtquery.samples.GwtQueryImageZoom/GwtQueryImageZoom.html')">gwtquery.samples.GwtQueryImageZomm/GwtQueryImageZoom.html</a></li>
-<li><a href="javascript:goTo('FadeEffectsSample/FadeEffectsSample.html')">FadeEffectsSample/FadeEffectsSample.html</a></li>
-<li><a href="javascript:goTo('SlideEffectsSample/SlideEffectsSample.html')">SlideEffectsSample/SlideEffectsSample.html</a></li>
+<li><a href="javascript:goTo('gwtquery.samples.GwtQuerySample/GwtQuerySample.html')">GwtQuerySample.html</a></li>
+<li><a href="javascript:goTo('gwtquery.samples.GwtQueryDemo/GwtQueryDemo.html')">GwtQueryDemo.html</a></li>
+<li><a href="javascript:goTo('gwtquery.samples.GwtQueryEffects/GwtQueryEffects.html')">GwtQueryEffects.html</a></li>
+<li><a href="javascript:goTo('gwtquery.samples.GwtQueryEffectsMin/GwtQueryEffectsMin.html')">GwtQueryEffectsMin.html</a></li>
+<li><a href="javascript:goTo('gwtquery.samples.GwtQueryBench/GwtQueryBench.html')">GwtQueryBench.html</a></li>
+<li><a href="javascript:goTo('gwtquery.samples.GwtQueryImageZoom/GwtQueryImageZoom.html')">GwtQueryImageZoom.html</a></li>
+<li><a href="javascript:goTo('FadeEffectsSample/FadeEffectsSample.html')">FadeEffectsSample.html</a></li>
+<li><a href="javascript:goTo('SlideEffectsSample/SlideEffectsSample.html')">SlideEffectsSample.html</a></li>
+<li><a href="javascript:goTo('AnimationsSample/AnimationsSample.html')">AnimationsSample.html</a></li>
+
</ul>
</body>
</html>