`. That means that GWT buttons render appropriately in different browsers and on different client
10 | operating systems. We like the native browser controls because they're fast, accessible, and most familiar to users.
11 |
12 | When it comes to styling web applications, [CSS](http://www.w3.org/Style/CSS/) is ideal. So, instead of attempting to encapsulate UI styling behind a
13 | wall of least-common-denominator APIs, GWT provides very few methods directly related to style. Rather, developers are encouraged to define styles in stylesheets that are linked
14 | to application code using [style names](/javadoc/latest/com/google/gwt/user/client/ui/UIObject.html#setStyleName-java.lang.String-). In addition to cleanly separating style from application logic, this division of labor helps applications load and render more quickly, consume
15 | less memory, and even makes them easier to tweak during edit/debug cycles since there's no need to recompile for style tweaks.
16 |
17 | **Tip:** If you find a need to implement a browser specific dependency, you can use a [JSNI](DevGuideCodingBasics.html#DevGuideJavaScriptNativeInterface)
18 | method to retrieve the browser' UserAgent string.
19 |
20 | ```java
21 | public static native String getUserAgent() /*-{
22 | return navigator.userAgent.toLowerCase();
23 | }-*/;
24 | ```
25 |
26 |
--------------------------------------------------------------------------------
/src/main/markdown/articles/fragment_merging.md:
--------------------------------------------------------------------------------
1 | Fragment Merging
2 | ===
3 |
4 | _Alan Leung, Software Engineer_
5 |
6 | _Updated June 2012_
7 |
8 | As the functionality grows in a large GWT application, developers tend to add more
9 | split points (calls to GWT.runAsync), to ensure that the size of the initial fragment is
10 | as small as possible. Keeping the initial fragment small ensures that application starts as
11 | quickly as possible.
12 |
13 | However, adding more split points also increases the likelihood that two fragments share
14 | common code.
15 |
16 | 
17 |
18 | As shown in this diagram, the GWT compiler creates an exclusive fragment for each split
19 | point and adds any shared code to the leftovers fragment. The result is that the project's
20 | leftovers fragment gradually gets bigger as developers add more split points. While this has
21 | no effect in the initial loading time of the project, the latency of the first requested
22 | split point usually suffers.
23 |
24 | New to GWT 2.5 is **fragment merging**. We gave the code splitter the ability to
25 | automatically merge multiple exclusive fragments into a single fragment.
26 |
27 | 
28 |
29 | This diagram shows the situation after the compiler realized that E1 and E2 share enough code
30 | and automatically bundled those two split points into a single fragment, effectively pulling the
31 | shared code out of the leftovers fragment. When the application needs either E1 or E2, it downloads
32 | the whole bundle. Not only does this decrease the leftovers fragment's size, it also decreases the
33 | total number of HTTP requests in a user session, assuming that many fragments will eventually
34 | be needed.
35 |
36 | To enable this feature, simply add -XfragmentCount x to the GWT compiler command line and the
37 | code splitter will try to limit the number of exclusive fragments to x. Here, x is the lower bound
38 | on the number of exclusive fragments. The actual number might be greater than x when the compiler
39 | decides it might not be beneficial to merge as many split points as suggested.
40 |
--------------------------------------------------------------------------------
/src/main/java/com/google/gwt/site/markdown/fs/MDParent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.google.gwt.site.markdown.fs;
15 |
16 | import java.io.File;
17 | import java.util.LinkedList;
18 | import java.util.List;
19 |
20 | public class MDParent extends MDNode {
21 |
22 | public MDParent(MDParent parent, String name, String path, int depth, String relativePath) {
23 | super(parent, name, path, depth, relativePath);
24 | }
25 |
26 | private List
children = new LinkedList();
27 | private String href;
28 | private File configFile;
29 |
30 | @Override
31 | public String toString() {
32 | return "MDParent [getName()=" + getName() + ", getDepth()=" + getDepth() + "]";
33 | }
34 |
35 | public void setChildren(List children) {
36 | this.children = children;
37 | }
38 |
39 | public void addChild(MDNode node) {
40 | children.add(node);
41 | }
42 |
43 | public List getChildren() {
44 | return children;
45 | }
46 |
47 | @Override
48 | public boolean isFolder() {
49 | return true;
50 | }
51 |
52 | @Override
53 | public String getDisplayName() {
54 | if (displayName == null)
55 | return getName();
56 | return displayName;
57 | }
58 |
59 | public void setHref(String href) {
60 | this.href = href;
61 |
62 | }
63 |
64 | public String getHref() {
65 | return href;
66 | }
67 |
68 | public void setConfigFile(File file) {
69 | this.configFile = file;
70 |
71 | }
72 |
73 | public File getConfigFile() {
74 | return configFile;
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/src/main/site/doc/latest/tutorial/gettingstarted/StockWatcher.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | StockWatcher
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
StockWatcher
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/src/main/markdown/doc/latest/DevGuideUi.md:
--------------------------------------------------------------------------------
1 | UI
2 | ===
3 |
4 | GWT user interface classes are similar to those in existing UI frameworks such as [Swing](http://java.sun.com/javase/6/docs/api/javax/swing/package-summary.html) and [SWT](http://www.eclipse.org/swt/) except that the widgets are rendered using dynamically-created HTML rather than pixel-oriented graphics.
5 |
6 | In traditional JavaScript programming, dynamic user interface creation is done by manipulating the browser's DOM. While GWT provides access to the browser's DOM directly using the [DOM package](/javadoc/latest/com/google/gwt/dom/client/package-summary.html), it is far easier to use classes from the [Widget](/javadoc/latest/com/google/gwt/user/client/ui/Widget.html) hierarchy. The Widget classes make it easier to quickly build interfaces that will work correctly on all browsers.
7 |
8 | 1. [Cross-Browser Support](DevGuideUiBrowser.html) — Use widgets and composites for cross-browser compatibility
9 | 2. [Layout Using Panels](DevGuideUiPanels.html) — Explore the various panels available for layout
10 | 3. [Widgets](DevGuideUiWidgets.html) — Create user controls with widgets
11 | 4. [Creating Custom Widgets](DevGuideUiCustomWidgets.html) — Create new widgets, composite widgets, or native JavaScript widgets
12 | 5. [Cell Widgets](DevGuideUiCellWidgets.html) New 2.1 — Work with widgets, panels, the DOM, events, CSS, declarative UI and images.
13 | 6. [Editors](DevGuideUiEditors.html) New 2.1 — Allows data stored in an object graph to be mapped onto a graph of Editors.
14 | 7. [Working with the DOM](DevGuideUiDom.html) — When necessary, manipulate the browser's DOM directly
15 | 8. [Events and Handlers](DevGuideUiHandlers.html) — Handle events published by widgets
16 | 9. [Working with CSS](DevGuideUiCss.html) — Style widgets with cascading style sheets
17 | 10. [Declarative UI with UiBinder](DevGuideUiBinder.html) — Build widget and DOM structures from XML markup
18 | 11. [Bundling Image Resources](DevGuideUiImageBundles.html) — Optimize image loading by reducing the number of HTTP requests for images
19 |
--------------------------------------------------------------------------------
/src/main/site/css/jenkins-theme.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Used in the GWT Jenkins instance by the simple-theme plugin.
3 | * The plugin needs a external url with the .css file.
4 | */
5 | #side-panel, #main-panel {
6 | margin-bottom: 33px;
7 | }
8 | #a-side-panel {
9 | background-color: #efefef;
10 | }
11 | #breadcrumbBar,.top-sticker-inner {
12 | background-color: #d5f0f6;
13 | }
14 | #right-top-nav {
15 | display: none;
16 | }
17 | #footer-container {
18 | background-color: #d5f0f6;
19 | border-bottom: 8px solid #606060;
20 | padding-top: 7px;
21 | height: 7px;
22 | }
23 | #l10n-footer {
24 | width: 0px;
25 | overflow: hidden;
26 | }
27 | #header {
28 | background: #f55837;
29 | background: #E86348;
30 | border-top: 8px solid #606060;
31 | }
32 | #header .login a, #header .login span {
33 | color: #972108 !important;
34 | }
35 | #header .login a {
36 | line-height: 15px;
37 | padding: 10px;
38 | }
39 | #header .login a:HOVER {
40 | background-color: #e54827;
41 | color: white !important;
42 | }
43 | #header .login a:LINK {
44 | text-decoration: none;
45 | }
46 | #header #jenkins-home-link img {
47 | display: none;
48 | }
49 | #header .logo {
50 | background-color: #e54827;
51 | background-image: url(../images/logo-wire.png);
52 | background-repeat: no-repeat;
53 | background-size: contain;
54 | width: 150px;
55 | height: 100%;
56 | }
57 | #header #jenkins-home-link,
58 | #header #jenkins-home-link:visited,
59 | #header #jenkins-home-link:link {
60 | font-family: Verdana;
61 | font-size: 32px;
62 | color: white;
63 | text-decoration: none;
64 | line-height: 50px;
65 | padding-left: 65px;
66 | white-space: nowrap;
67 | }
68 | #jenkins-home-link:before {
69 | content: 'GWT';
70 | }
71 | #jenkins-home-link:after {
72 | content: 'continuous integration';
73 | font-size: 14px;
74 | padding-left: 35px;
75 | }
76 | @media (max-width: 980px) {
77 | #jenkins-home-link:after {
78 | content: '';
79 | }
80 | }
81 | @media (max-width: 480px) {
82 | #jenkins-home-link:before {
83 | content: '';
84 | }
85 | #header .logo {
86 | width: 60px;
87 | }
88 | }
89 | #search-box {
90 | border: solid 1px #e54827;
91 | border-radius: 0px;
92 | }
93 | #description {
94 | font-size: 14px;
95 | line-height: 20px;
96 | text-align: justify;
97 | }
98 |
--------------------------------------------------------------------------------
/src/test/java/com/google/gwt/site/markdown/MDTranslatorTest.java:
--------------------------------------------------------------------------------
1 | package com.google.gwt.site.markdown;
2 |
3 | import junit.framework.TestCase;
4 |
5 | /**
6 | * Test class for MDTranslate
7 | */
8 | public class MDTranslatorTest extends TestCase {
9 |
10 | private void assertAdjustUrl(MDTranslator md, String relativePath, String tag, String attr,
11 | String url, String match) {
12 | String ini = "\n ";
13 | String end = "\n ";
14 | String html = ini + "<" + tag + " " + attr + "='" + url + "' foo='bar'><" + tag + "/>" + end;
15 | String expected =
16 | ini + "<" + tag + " " + attr + "='" + match + "' foo='bar'><" + tag + "/>" + end;
17 | String actual = md.adjustRelativePath(html, relativePath);
18 | assertEquals(expected, actual);
19 | }
20 |
21 | public void testAdjustRelativePath() throws Exception {
22 | MDTranslator mdt = new MDTranslator(null, null, null);
23 |
24 | // empty url
25 | assertAdjustUrl(mdt, "../", "a", "href", "", "../");
26 | // absolute url
27 | assertAdjustUrl(mdt, "../", "a", "href", "/index.html", "../index.html");
28 | // relative url
29 | assertAdjustUrl(mdt, "../", "a", "href", "index.html", "../index.html");
30 | assertAdjustUrl(mdt, "../", "a", "href", "./index.html", ".././index.html");
31 |
32 | // Do not change protocol urls
33 | assertAdjustUrl(mdt, "../", "a", "href", "mailto:foo@bar", "mailto:foo@bar");
34 | assertAdjustUrl(mdt, "../", "a", "href", "http://foo.bar/whatever", "http://foo.bar/whatever");
35 | assertAdjustUrl(mdt, "../", "a", "href", "https://foo.bar/whatever", "https://foo.bar/whatever");
36 |
37 | // Do not change hashes
38 | assertAdjustUrl(mdt, "../", "a", "href", "#", "#");
39 | assertAdjustUrl(mdt, "../", "a", "href", "#foo", "#foo");
40 |
41 | // Check script and link
42 | assertAdjustUrl(mdt, "../../", "script", "src", "/gwtproject/gwtproject.nocache.js",
43 | "../../gwtproject/gwtproject.nocache.js");
44 | assertAdjustUrl(mdt, "../", "link", "href", "/main.css", "../main.css");
45 |
46 | // Check quotes inside quotes.
47 | assertAdjustUrl(mdt, "../", "a", "href", "a\"b\"c", "../a\"b\"c");
48 | assertAdjustUrl(mdt, "../", "a", "href",
49 | "javascript:alert(\"hello\");", "javascript:alert(\"hello\");");
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/main/markdown/doc/latest/DevGuideOptimizing.md:
--------------------------------------------------------------------------------
1 | Optimizing
2 | ===
3 |
4 | Once you have your application basically working, it's time to
5 | improve its performance. You can use Speed Tracer to
6 | find out how your application is performing, and you can use a number
7 | of tools to address the specific performance problems that you find.
8 |
9 | ## Code Splitting
10 |
11 | As an AJAX app develops, the JavaScript part of it tends to grow,
12 | eventually to the point that downloading and installing
13 | the JavaScript code adds significant time to the application's startup.
14 | [GWT's code splitter](DevGuideCodeSplitting.html) can speed
15 | up the application's startup by allowing the application to start
16 | running before all of its code is installed.
17 |
18 | ## Compile Report
19 |
20 | When programming in GWT, it can sometimes be difficult to understand
21 | the compiled output. This is especially true for users
22 | of [Code Splitting](DevGuideCodeSplitting.html): why are
23 | some fragments bigger, some smaller? Our answer to these questions are
24 | [Compile Reports](DevGuideCompileReport.html). Compile
25 | Reports let GWT programmers gain insight into what happens in their
26 | application during the compile: how much output their code leads to,
27 | what Java packages and classes lead to large JavaScript output, and
28 | how the code is split up during Code Splitting. Equipped with this
29 | information, programmers can then modify their application in a
30 | targeted way in order to reduce the size of the entire compiled
31 | application or the size of certain fragments.
32 |
33 | ## Client Bundle
34 |
35 | The resources in a deployed GWT application can be roughly categorized
36 | into resources to never cache (`.nocache.js`), to cache forever
37 | (`.cache.html`), and everything else (`myapp.css`).
38 | [Client Bundles](DevGuideClientBundle.html) allow you to
39 | move resources from the everything-else category into the
40 | cache-forever category.
41 |
42 | ## Lightweight Metrics
43 |
44 | The [Lightweight Metrics](DevGuideLightweightMetrics.html) system is a tool to find key areas where latency may be noticeable to your end users. It has very little overhead, can report metrics on application load time and RPC calls, you can profile multiple GWT modules at the same time, and can be extended for your own measurement needs. The Debug Panel for GWT uses the Lightweight metrics system. It provides an easy way to collect metrics and test your GWT application.
45 |
--------------------------------------------------------------------------------
/src/main/markdown/doc/latest/DevGuideUiHandlers.md:
--------------------------------------------------------------------------------
1 | UiHandlers
2 | ===
3 |
4 | Events in GWT use the _handler_ model similar to other user interface frameworks. A handler interface defines one or more methods that the widget calls to announce an
5 | event. A class wishing to receive events of a particular type implements the associated handler interface and then passes a reference to itself to the widget to _subscribe_
6 | to a set of events. The [Button](/javadoc/latest/com/google/gwt/user/client/ui/Button.html) class, for example,
7 | publishes click events. The associated handler interface is [ClickHandler](/javadoc/latest/com/google/gwt/event/dom/client/ClickHandler.html).
8 |
9 | The following example demonstrates how to add a custom ClickHandler subclass to an instance of a Button:
10 |
11 | ```java
12 | public void anonClickHandlerExample() {
13 | Button b = new Button("Click Me");
14 | b.addClickHandler(new ClickHandler() {
15 | public void onClick(ClickEvent event) {
16 | // handle the click event
17 | }
18 | });
19 | }
20 | ```
21 |
22 | Using anonymous inner classes as in the above example can use excessive memory for a large number of widgets, since it results in the creation of many handler objects. Instead
23 | of creating separate instances of the ClickHandler object for each widget that needs to be listened to, a single handler can be shared between many widgets. Widgets declare
24 | themselves as the source of an event when they invoke a handler method, allowing a single handler to distinguish between multiple event publishers with an event object's
25 | getSource() method. This makes better use of memory but requires slightly more code, as shown in the following example:
26 |
27 | ```java
28 | public class HandlerExample extends Composite implements ClickHandler {
29 | private FlowPanel fp = new FlowPanel();
30 | private Button b1 = new Button("Button 1");
31 | private Button b2 = new Button("Button 2");
32 |
33 | public HandlerExample() {
34 | initWidget(fp);
35 | fp.add(b1);
36 | fp.add(b2);
37 | b1.addClickHandler(this);
38 | b2.addClickHandler(this);
39 | }
40 |
41 | public void onClick(ClickEvent event) {
42 | // note that in general, events can have sources that are not Widgets.
43 | Widget sender = (Widget) event.getSource();
44 |
45 | if (sender == b1) {
46 | // handle b1 being clicked
47 | } else if (sender == b2) {
48 | // handle b2 being clicked
49 | }
50 | }
51 | }
52 | ```
53 |
54 |
--------------------------------------------------------------------------------
/src/main/java/com/google/gwt/site/markdown/MarkupWriter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.google.gwt.site.markdown;
15 |
16 | import java.io.File;
17 | import java.io.IOException;
18 | import java.util.Stack;
19 |
20 | import com.google.gwt.site.markdown.fs.MDNode;
21 | import com.google.gwt.site.markdown.fs.MDParent;
22 |
23 | public class MarkupWriter {
24 |
25 | private final File rootFile;
26 |
27 | public MarkupWriter(File rootFile) {
28 | this.rootFile = rootFile;
29 | }
30 |
31 | public void writeHTML(MDNode node, String html) throws TranslatorException {
32 |
33 | if (node.isFolder()) {
34 | throw new IllegalArgumentException();
35 | }
36 |
37 | Stack stack = new Stack();
38 |
39 | MDParent tmp = node.getParent();
40 | stack.add(tmp);
41 |
42 | while (tmp.getParent() != null) {
43 | tmp = tmp.getParent();
44 | stack.add(tmp);
45 | }
46 |
47 | // get rootnode from stack
48 | stack.pop();
49 |
50 | File currentDir = rootFile;
51 | ensureDirectory(currentDir);
52 | while (!stack.isEmpty()) {
53 | MDParent pop = stack.pop();
54 | currentDir = new File(currentDir, pop.getName());
55 | ensureDirectory(currentDir);
56 | }
57 |
58 | String fileName =
59 | node.getName().substring(0, node.getName().length() - ".md".length()) + ".html";
60 | File fileToWrite = new File(currentDir, fileName);
61 |
62 | try {
63 | Util.writeStringToFile(fileToWrite, html);
64 | } catch (IOException e) {
65 | throw new TranslatorException("can not write markup to file: '" + fileToWrite + "'", e);
66 |
67 | }
68 | }
69 |
70 | private void ensureDirectory(File dir) throws TranslatorException {
71 | if (!dir.exists()) {
72 | boolean created = dir.mkdir();
73 | if (!created) {
74 | throw new TranslatorException("can not create directory: '" + dir + "'");
75 | }
76 | }
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/src/main/markdown/doc/latest/DevGuideUiWidgets.md:
--------------------------------------------------------------------------------
1 | UiWidgets
2 | ===
3 |
4 | You construct user interfaces in GWT applications using [widgets](/javadoc/latest/com/google/gwt/user/client/ui/Widget.html) that
5 | are contained within [panels](/javadoc/latest/com/google/gwt/user/client/ui/Panel.html). Widgets allow you to interact with the user. Panels
6 | control the placement of user interface elements on the page. Widgets and panels work the same way
7 | on all browsers; by using them, you eliminate the need to write specialized code for each browser.
8 |
9 | ## Widgets
10 |
11 | Widgets define your applications input and output with the user. Examples of widgets include the following:
12 |
13 | * [Button](/javadoc/latest/com/google/gwt/user/client/ui/Button.html) A user clicks the mouse button to
14 | activate the button.
15 | * > 
16 |
17 | * [TextBox](/javadoc/latest/com/google/gwt/user/client/ui/TextBox.html) The application can display text and
18 | the user can type in the text box.
19 | * > 
20 |
21 | * [Tree](/javadoc/latest/com/google/gwt/user/client/ui/Tree.html) A collapsible hierarchy of widgets.
22 | * > 
23 |
24 | * [RichTextArea](/javadoc/latest/com/google/gwt/user/client/ui/RichTextArea.html) A text editor that allows
25 | users to apply rich formatting of the text.
26 | * > 
27 |
28 | For the complete list of GWT UI elements, see [Widget Gallery](RefWidgetGallery.html).
29 |
30 | You are not limited to the set of widgets provided by GWT. There are a number of ways to [create custom
31 | widgets](DevGuideUiCustomWidgets.html):
32 |
33 | * You can bundle together existing widgets and create a [Composite](/javadoc/latest/com/google/gwt/user/client/ui/Composite.html) widget.
34 | * You can write GWT bindings to an existing JavaScript widget.
35 | * You can create your own widget from scratch using either Java or JavaScript.
36 |
37 | You can also use one or more of the many third party widget libraries written for GWT.
38 |
39 | ## Styles
40 |
41 | Visual styles are applied to widgets using [Cascading Style Sheets (CSS)](DevGuideUiCss.html). Besides the default browser supplied
42 | definitions, each GWT widget and panel has pre-defined style sheet class definitions documented in the class reference documentation.
43 |
44 | ## See Also
45 |
46 | * [Creating Custom Widgets](DevGuideUiCustomWidgets.html) Discussion of how to create your own widgets in GWT.
47 |
48 | * [Layout Using Panels](DevGuideUiPanels.html) Examples of how to use panels.
49 |
--------------------------------------------------------------------------------
/src/main/markdown/doc/latest/tutorial/design.md:
--------------------------------------------------------------------------------
1 | Design
2 | ===
3 |
4 | At this point, you've created the stub files you need to start coding StockWatcher.
5 |
6 | In this section, you'll review the functional requirements and design the user interface.
7 |
8 | 1. [Examine the functional requirements.](#requirements)
9 | 2. [Identify the elements of the UI design.](#elements)
10 |
11 | ## Examining the functional requirements
12 |
13 | Initially you want the StockWatcher application to do six things.
14 |
15 | * Provide users with the ability to add stocks. (Supply simple validation on input for illegal characters or existing stock.)
16 | * Display the following information for each stock: symbol, price, change since last refresh.
17 | * Provide users with the ability to delete a stock from the list.
18 | * Refresh the stock price.
19 | * Calculate the change since the last refresh as both a number and a percentage.
20 | * Display a timestamp indicating the last update.
21 |
22 |
23 | ## Identifying the elements of the UI design
24 |
25 | 
26 |
27 | After studying StockWatcher's functional requirements, you decide you need these UI elements:
28 |
29 | * a table to hold the stock data
30 | * two buttons, one to add stocks and one to remove them
31 | * an input box to enter the stock code
32 | * a timestamp to show the time and date of the last refresh
33 |
34 | The design team has suggested the following additions:
35 |
36 | * a logo
37 | * a header
38 | * colors to indicate whether the change in price was positive or negative
39 |
40 | ### Including Static Elements
41 |
42 | GWT does not dictate how you lay out your HTML page. A GWT application
43 | can take up the entire browser window, as it does in the startup
44 | application, or it can be embedded in an existing page, as it is in the Build a Sample GWT Application page of this tutorial.
45 |
46 | The StockWatcher application contains both static and dynamic elements. The Google Code logo and the header "StockWatcher" are static elements in the HTML host page. All the other elements are created programmatically using GWT widgets and panels.
47 |
48 | ## What's Next
49 |
50 | At this point you've reviewed StockWatcher's functional requirements. You have a clear idea of what StockWatcher does. You know what UI elements you need to implement and how you want to lay them out.
51 |
52 | Now you're ready to build the user interface using GWT widgets and panels.
53 |
54 | [Step 3: Building the User Interface](buildui.html)
55 |
--------------------------------------------------------------------------------
/src/main/site/assets/build/fonts/icons/icons.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'iconsregular';
3 | src: url('icons.eot');
4 | src: url('icons.eot?#iefix') format('embedded-opentype'),
5 | url('icons.woff2') format('woff2'),
6 | url('icons.woff') format('woff'),
7 | url('icons.ttf') format('truetype'),
8 | url('icons.svg#iconsregular') format('svg');
9 | font-weight: normal;
10 | font-style: normal;
11 | }
12 |
13 | [class^="icon_"], [class*=" icon_"] {
14 | font-family: 'iconsregular';
15 | speak: none;
16 | font-style: normal;
17 | font-weight: normal;
18 | font-variant: normal;
19 | text-transform: none;
20 | line-height: 1;
21 |
22 | /* Better Font Rendering =========== */
23 | -webkit-font-smoothing: antialiased;
24 | -moz-osx-font-smoothing: grayscale;
25 | }
26 |
27 | .icon_arrowUp:before {
28 | content: "\e602";
29 | }
30 |
31 | .icon_download:before {
32 | content: "\e603";
33 | }
34 |
35 | .icon_editGithub:before {
36 | content: "\e604";
37 | }
38 |
39 | .icon_getstarted:before {
40 | content: "\e605";
41 | }
42 |
43 | .icon_debug:before {
44 | content: "\e606";
45 | }
46 |
47 | .icon_doc:before {
48 | content: "\e607";
49 | }
50 |
51 | .icon_makeGWTBetter:before {
52 | content: "\e608";
53 | }
54 |
55 | .icon_optimise:before {
56 | content: "\e609";
57 | }
58 |
59 | .icon_overview:before {
60 | content: "\e60a";
61 | }
62 |
63 | .icon_resources:before {
64 | content: "\e60b";
65 | }
66 |
67 | .icon_roadmap:before {
68 | content: "\e60b";
69 | }
70 |
71 | .icon_run:before {
72 | content: "\e60c";
73 | }
74 |
75 | .icon_terms:before {
76 | content: "\e60d";
77 | }
78 |
79 | .icon_tutorials:before {
80 | content: "\e60e";
81 | }
82 |
83 | .icon_write:before {
84 | content: "\e60f";
85 | }
86 |
87 | .icon_gwt:before {
88 | content: "\e600";
89 | }
90 |
91 | .icon_gwtSymbol:before {
92 | content: "\e601";
93 | }
94 |
95 | .icon_arrowTail:before {
96 | content: "\e802";
97 | }
98 |
99 | .icon_arrowSimple:before {
100 | content: "\e803";
101 | }
102 |
103 | .icon_arrow:before {
104 | content: "\e804";
105 | }
106 |
107 | .icon_google:before {
108 | content: "\e806";
109 | }
110 |
111 | .icon_jd:before {
112 | content: "\e807";
113 | }
114 |
115 | .icon_language:before {
116 | content: "\e808";
117 | }
118 |
119 | .icon_minifleche:before {
120 | content: "\e809";
121 | }
122 |
123 | .icon_search:before {
124 | content: "\e80c";
125 | }
126 |
127 | .icon_terms2:before {
128 | content: "\e80d";
129 | }
130 |
131 | .icon_twitter:before {
132 | content: "\e80f";
133 | }
134 |
--------------------------------------------------------------------------------
/src/main/markdown/doc/latest/tutorial/JSONphp.md:
--------------------------------------------------------------------------------
1 | JSON php
2 | ===
3 |
4 | If you have a web server (Apache, IIS, etc.) installed locally and PHP installed, you can write a PHP script to generate stock data and make the call to your local server. What's important for this example is that the stock data is JSON-encoded and that the server is local.
5 |
6 | 1. Create a PHP script.
7 | * In the Eclipse Package Explorer, select the `StockWatcher/war` folder.
8 | * From the Eclipse menu bar, select File > New > File.
9 | * In the New File window, enter the file name `stockPrices.php`
10 |
11 | ```php
12 |
45 | ```
46 |
47 | 2. Compile StockWatcher.
48 | * Click the GWT Compile Project button in the toolbar  or run the `ant build` script to create the production mode files for the application (which will now include stockPrices.php).
49 | * 
50 |
51 | 3. Move the compiled StockWatcher files in the StockWatcher/war directory to a /StockWatcher
52 | directory in whatever web server (Apache, IIS, etc.) you have installed locally which supports PHP. If you are not using Java servlets (e.g. GWT RPC), you will not have to move over the files in StockWatcher/war/WEB-INF
53 | 4. Test the stock quote server.
54 | * In a web browser, navigate to `http://localhost/StockWatcher/stockPrices.php?q=ABC+DEF`
55 | * StockPrice data is returned in JSON format
56 |
57 | ```json
58 | [{"symbol":"ABC","price":40.485578668179,"change":-0.53944918844604},
59 | {"symbol":"DEF","price":1.3606576154209,"change":0.0051755221198266}]
60 | ```
61 |
62 | Now that you can retrieve JSON-encoded stock data from the server, continue with the next step in the JSON tutorial, [Manipulating JSON data in the client-side code.](JSON.html#client)
63 |
64 |
--------------------------------------------------------------------------------
/src/main/markdown/privacy.md:
--------------------------------------------------------------------------------
1 | Privacy Policy
2 | ===
3 |
4 | [Terms of Service](terms.html) | **Privacy Notice**
5 |
6 | Last modified: May 11th, 2013
7 |
8 | Google is a member of the GWT Open Source Project and operates this GWT website as a contribution to GWT. The [Google Privacy Policy](http://www.google.com/intl/en/policies/privacy/) applies to Google's operation of this website.
9 |
10 | The [Google Privacy Policy](http://www.google.com/privacy.html) describes how we treat personal information when you use Google services, including information provided when you use GWT. In addition, the following describes privacy practices specific to GWT.
11 |
12 | ## Information we collect
13 |
14 | When you use GWT's development mode server or compiler, the application periodically sends a unique timestamp ID and version number of your product back to Google's servers so that the application can notify you of new versions. The timestamp ID is generated the first time you use the compiler or development mode server. As a part of this request, Google will log the timestamp ID and the version number.
15 |
16 | The GWT developer plugin checks for updates once a day or as configured on the respective browser, sending the current plugin version number. As a part of this request, Google will log the plugin version number.
17 |
18 | We won't log cookies or personal information about you, and we will only use any data we log in the aggregate to operate and improve GWT.
19 |
20 | ## Uses
21 |
22 | We use this information internally to determine usage volume of the development mode server and compiler in the aggregate.
23 |
24 | ## Your Choices
25 |
26 | You may choose to not use the development mode server and uninstall the browser plugin at any time. You may use just the GWT compiler with the flag "-XdisableUpdateCheck" to compile your code directly to JavaScript. This does not send a request for the most recent version of GWT.
27 |
28 | ## More Information
29 |
30 | Google adheres to the US Safe Harbor privacy principles. For more information about the Safe Harbor framework or our registration, see the [Department of Commerce's website](http://www.export.gov/safeharbor/).
31 |
32 | Further information about GWT is available [here](https://www.gwtproject.org).
33 |
34 | For more information about our privacy practices, go to the [full privacy policy](http://www.google.com/privacypolicy.html). If you have additional questions, please [contact us any time](http://www.google.com/support/bin/request.py?form_type=user&stage=fm&user_type=user&contact_type=privacy&hl=en). Or write to us at:
35 |
36 | Privacy Matters
37 | c/o Google Inc.
38 | 1600 Amphitheatre Parkway
39 | Mountain View CA 94043 (USA)
40 |
41 |
--------------------------------------------------------------------------------
/src/main/markdown/download.md:
--------------------------------------------------------------------------------
1 |
31 |
32 | Download
33 | ===
34 |
35 |
36 |
GWT SDK
37 |
38 | The GWT SDK contains the core libraries and compiler that you need to write web applications. See the Release Notes for
39 | this latest version.
40 |
41 |
42 | Note - This download contains the standalone GWT SDK and tools only. If you're using Eclipse, we suggest that you download and install the GWT Eclipse Plugin instead.
43 |
44 |
53 |
54 |
55 |
56 |
57 | Plugin for Eclipse (incl. SDKs)
58 |
59 |
The GWT Eclipse Plugin provides IDE support for GWT projects.
60 |
61 | Note - This download includes Eclipse tools as well as the option to install the GWT SDK.
62 |
63 |
64 | Note - GWT release candidates are not bundled with the GWT Eclipse Plugin. The GWT Eclipse Plugin's version of GWT might also not always be up-to-date.
65 |
66 |
72 |
73 |
--------------------------------------------------------------------------------
/src/main/markdown/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/src/main/java/com/google/gwt/site/markdown/fs/MDNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.google.gwt.site.markdown.fs;
15 |
16 | public class MDNode {
17 | private final String name;
18 | private final MDParent parent;
19 | private final String path;
20 |
21 | private String description;
22 | private final int depth;
23 | private final String relativePath;
24 |
25 | protected String displayName;
26 |
27 | private boolean excludeFromToc;
28 |
29 | public MDNode(MDParent parent, String name, String path, int depth, String relativePath) {
30 | this.parent = parent;
31 | this.name = name;
32 | this.path = path;
33 | this.depth = depth;
34 | this.relativePath = relativePath;
35 | this.description = "";
36 | }
37 |
38 | public String getName() {
39 | return name;
40 | }
41 |
42 | public MDParent getParent() {
43 | return parent;
44 | }
45 |
46 | public String getPath() {
47 | return path;
48 | }
49 |
50 | public void setDescription(String description) {
51 | this.description = description;
52 | }
53 |
54 | public String getDescription() {
55 | return description;
56 | }
57 |
58 | public int getDepth() {
59 | return depth;
60 | }
61 |
62 | @Override
63 | public String toString() {
64 | return "MDNode [name=" + name + ", depth=" + depth + "]";
65 | }
66 |
67 | public String getRelativePath() {
68 | return relativePath;
69 | }
70 |
71 | public boolean isFolder() {
72 | return false;
73 | }
74 |
75 | public MDParent asFolder() {
76 | return (MDParent) this;
77 | }
78 |
79 | /**
80 | * @param displayName the displayName to set
81 | */
82 | public void setDisplayName(String displayName) {
83 | this.displayName = displayName;
84 | }
85 |
86 | /**
87 | * @return the displayName
88 | */
89 | public String getDisplayName() {
90 | if (displayName == null)
91 | return getName().substring(0, getName().length() - ".md".length());
92 | return displayName;
93 | }
94 |
95 | public void setExcludeFromToc(boolean excludeFromToc) {
96 | this.excludeFromToc = excludeFromToc;
97 | }
98 |
99 | public boolean isExcludeFromToc() {
100 | return excludeFromToc;
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/Gruntfile.js:
--------------------------------------------------------------------------------
1 | module.exports = function(grunt) {
2 |
3 | grunt.initConfig({
4 | pkg: grunt.file.readJSON('package.json'),
5 |
6 | concat: {
7 | dist: {
8 | src: [
9 | 'src/main/site/assets/js/global.js'
10 | ],
11 | dest: 'src/main/site/assets/build/js/global.js'
12 | }
13 | },
14 |
15 | uglify: {
16 | build: {
17 | src: 'src/main/site/assets/build/js/global.js',
18 | dest: 'src/main/site/assets/build/js/global.min.js'
19 | }
20 | },
21 |
22 | imagemin: {
23 | dynamic: {
24 | files: [{
25 | expand: true,
26 | cwd: 'src/main/site/assets/img/',
27 | src: ['**/*.{png,jpg,gif}'],
28 | dest: 'src/main/site/assets/build/img/'
29 | }]
30 | }
31 | },
32 |
33 | less: {
34 | development: {
35 | options: {
36 | paths: ["src/main/site/assets/less"],
37 | cleancss: false
38 | },
39 | files: {
40 | "src/main/site/assets/build/css/style.css": "src/main/site/assets/less/style.less"
41 | }
42 | },
43 | production: {
44 | options: {
45 | paths: ["src/main/site/assets/less"],
46 | cleancss: true
47 | },
48 | files: {
49 | "src/main/site/assets/build/css/style.min.css": "src/main/site/assets/less/style.less"
50 | }
51 | }
52 | },
53 |
54 | watch: {
55 | options: {
56 | livereload: true
57 | },
58 | scripts: {
59 | files: ['src/main/site/assets/js/*.js'],
60 | tasks: ['concat', 'uglify'],
61 | options: {
62 | spawn: false
63 | }
64 | },
65 | css: {
66 | files: ['src/main/site/assets/less/*.less'],
67 | tasks: ['less'],
68 | options: {
69 | spawn: false
70 | }
71 | },
72 | images: {
73 | files: ['src/main/site/assets/img/**/*.{png,jpg,gif}'],
74 | tasks: ['imagemin'],
75 | options: {
76 | spawn: false
77 | }
78 | }
79 | }
80 |
81 | });
82 |
83 | grunt.loadNpmTasks('grunt-contrib-concat');
84 | grunt.loadNpmTasks('grunt-contrib-uglify');
85 | grunt.loadNpmTasks('grunt-contrib-imagemin');
86 | grunt.loadNpmTasks('grunt-contrib-less');
87 | grunt.loadNpmTasks('grunt-contrib-watch');
88 |
89 | grunt.registerTask('default', ['concat', 'uglify', 'imagemin', 'less', 'watch']);
90 | grunt.registerTask('imgs', 'imagemin');
91 | };
--------------------------------------------------------------------------------
/src/main/markdown/doc/latest/polymer-tutorial/introduction.md:
--------------------------------------------------------------------------------
1 | # Building a modern GWT app using Polymer Elements:
2 |
3 | ## **Disclaimer** :
4 | _This tutorial is based on the usage of three third-party **open-source** libraries, external to, and not managed by, the **gwtproject** organization_:
5 |
6 | * _[**Polymer**][1]: a JavaScript library for building web applications with Web Components. Polymer is owned by **Google Inc**._
7 | * _[**Polymer Elements**][5]: a collection of widgets built in Polymer. Owned by **Google Inc**._
8 | * _[**GWT-Polymer-Elements**][3]: a Java wrapper enabling Polymer Elements to be used in GWT projects. Owned by **Vaadin Ltd**._
9 |
10 | The main goal of the tutorial is to teach our audience the process of creating real GWT projects that use JavaScript widgets and libraries.
11 |
12 | The **gwtproject** is not affiliated with, nor does it endorse, the aforementioned libraries.
13 |
14 | ## Introduction
15 |
16 | In this tutorial, you'll learn how to write a **TodoList** application using Polymer Web Components. [Web Components][1] define a collection of standards allowing us to bundle markup and styles into custom HTML elements. [Polymer][0] is a JavaScript library designed to make web component development easier.
17 |
18 | In this case, we want to fulfil the [Material Design][2] specification. Therefore, we'll be using the Vaadin [gwt-polymer-elements][3] library. This library, generated by [gwt-api-generator][4], is a JsInterop wrapper for the Polymer [Iron and Paper][5] elements.
19 |
20 | Before we start, you might want to try out the [TodoList][6] application to see what we are about to build.
21 |
22 | [
23 |
][6]
24 |
25 | [0]: https://www.polymer-project.org/1.0/
26 | [1]: https://en.wikipedia.org/wiki/Web_Components
27 | [2]: http://www.google.es/design/spec/material-design/introduction.html
28 | [3]: https://vaadin.com/gwt
29 | [4]: https://github.com/vaadin/gwt-api-generator
30 | [5]: https://elements.polymer-project.org/
31 | [6]: http://manolo.github.io/gwt-polymer-todo-list/demo/TodoListWidgets.html
32 |
33 | ## The Learning process
34 |
35 | During this build process you'll learn how to:
36 |
37 | * Create a new Maven project.
38 | * Run your project using `SuperDevMode`.
39 | * Add external libraries to your application.
40 | * Configure the project to use the experimental `JsInterop` mode.
41 |
42 | This application can be built using either widgets or JsInterop elements. The former is the classic approach, while the latter has become the new tendency. Either option will teach you how to:
43 |
44 | * Create new widgets using UiBinder.
45 | * Import and use Polymer Web Components.
46 | * Deal with responsive layouts.
47 | * Style elements using `UiBinder`.
48 | * Add event handlers to UiBinder components.
49 | * Use a basic data model.
50 |
51 | ## What's next
52 |
53 | [Step 1: Create and prepare a new Project](create.html)
54 |
--------------------------------------------------------------------------------
/src/main/markdown/usingintellij.md:
--------------------------------------------------------------------------------
1 | Using IntelliJ
2 | ===
3 |
4 | GWT provides a set of tools that can simply be used with a
5 | text editor, the command line, and a browser. However, you may also use GWT with your
6 | favorite IDE. The Idea IntelliJ Ultimate Edition provides a GWT plugin, but the free Idea IntelliJ Community Edition
7 | is all you need. IntelliJ provides awesome Maven support, enabling the IDE to read the project classpath, and easily create run configurations for compiling and running a GWT project.
8 |
9 | * [Download IntelliJ](#intellij)
10 | * [Import a Web Application](#importing)
11 | * [Run locally in Super Dev Mode](#running)
12 |
13 | ## Download IntelliJ
14 |
15 | If you do not already have IntelliJ, you may download it from the [IntelliJ Website](https://www.jetbrains.com/idea/download/).
16 |
17 | ## Import a Web Application
18 |
19 | To import a Web Application - create with an archetype creator, select **File > New > Project from existing source**
20 | from the File menu. Select the root directory of the project you want to import and press `enter`.
21 |
22 | A dialog opens:
23 |
24 | 
25 |
26 | Press `Create`. The import process starts and after a few seconds, the project window appears:
27 |
28 | 
29 |
30 | ## Run locally in Super Dev Mode
31 |
32 | To improve the development experience, you can set up two run configurations, one for the code server and another for the server.
33 |
34 | ### Code Server Run Configuration
35 |
36 | Press `Edit configuration`, a popup appears. Now press `+` and select `Maven`.
37 |
38 | Enter `gwt:codeserver -pl mywebapp-client -am` in the field under `Run`:
39 |
40 | 
41 |
42 | Now you have a run configuration, that starts the code server.
43 |
44 | Note: When running the code server from the command line, you need to run `gwt:codeserver -pl *-client -am`.
45 | This will not work inside a running configuration. Here you have to use the module name instead of '*'. Inside a run
46 | configuration, the command line looks like that: `gwt:codeserver -pl mywebapp-client -am`.
47 |
48 | ### Server Run Configuration
49 |
50 | Press `Edit configuration`, a popup appears. Now press `+` and select `Maven`.
51 |
52 | Enter `mvn jetty:run -pl *-server -am -Denv=dev` in the field under run:
53 |
54 | 
55 |
56 | Now, you have a run configuration, that starts the server.
57 |
58 | Note: you have to use the module name instead of '*'.
59 |
--------------------------------------------------------------------------------
/src/main/markdown/doc/latest/DevGuideCodingBasicsJSON.md:
--------------------------------------------------------------------------------
1 | JSON
2 | ===
3 |
4 | Many AJAX application developers have adopted [JSON](http://www.json.org/) as the data format of choice for server communication. It is a relatively
5 | simple format based on the object-literal notation of JavaScript. If you choose to use JSON-encoded data within your application, you can use GWT classes to parse and manipulate JSON objects, as well as the very useful and elegant concept of [JavaScript Overlay Types](DevGuideCodingBasicsOverlay.html).
6 |
7 | The JSON format is based on the syntax and data types of the JavaScript language. It supports strings, numbers, booleans, and null values. You can also combine multiple values
8 | into arrays and objects. JSON objects are simply unordered sets of name/value pairs, where the name is always a string and the value is any other valid JSON type (even another
9 | object). Here's an example of encoding product data in JSON:
10 |
11 | ```json
12 | {
13 | "product": {
14 | "name": "Widget",
15 | "company": "ACME, Inc",
16 | "partNumber": "7402-129",
17 | "prices": [
18 | { "minQty": 1, "price": 12.49 },
19 | { "minQty": 10, "price": 9.99 },
20 | { "minQty": 50, "price": 7.99 }
21 | ]
22 | }
23 | }
24 | ```
25 |
26 | See [json.org/example.html](http://www.json.org/example.html) for more JSON examples.
27 |
28 | 1. [Parsing JSON](#parsing)
29 | 2. [Mashups with JSON and JSNI](#mashups)
30 |
31 | ## Parsing JSON
32 |
33 | You can parse JSON Strings and convert them to a [JavaScriptObject](/javadoc/latest/com/google/gwt/core/client/JavaScriptObject.html) using [JsonUtils](/javadoc/latest/com/google/gwt/core/client/JsonUtils.html).
34 |
35 | ```java
36 | /*
37 | * Takes in a JSON String and evals it.
38 | * @param JSON String that you trust
39 | * @return JavaScriptObject that you can cast to an Overlay Type
40 | */
41 | public static T parseJson(String jsonStr)
42 | {
43 | return JsonUtils.safeEval(jsonStr);
44 | }
45 | ```
46 |
47 | Typically, you will receive JSON data as the response text of an [HTTP request](DevGuideServerCommunication.html#DevGuideHttpRequests). Thus, you'll first have to convert
48 | that `String` into a Object that you can work with using a method like the one shown above. The recommended way for interacting with [JavaScriptObjects](/javadoc/latest/com/google/gwt/core/client/JavaScriptObject.html) is to use [JavaScript Overlay Types](DevGuideCodingBasicsOverlay.html).
49 |
50 | ## Mashups with JSON and JSNI
51 |
52 | If you're loading JSON-encoded data from your own server, you'll typically use the [RequestBuilder](/javadoc/latest/com/google/gwt/http/client/RequestBuilder.html) and related classes to [make HTTP requests](DevGuideServerCommunication.html#DevGuideHttpRequests). However, you can also retrieve JSON from remote servers in true mashup fashion using GWT's [JavaScript Native Interface (JSNI)](DevGuideCodingBasics.html#DevGuideJavaScriptNativeInterface) functionality. The techniques for cross-site JSON is explained more fully in the getting started tutorial. To see a working example, check out the [Cross-site Client-Server Communication section](tutorial/Xsite.html) of the [Getting Started guide](tutorial/gettingstarted.html).
53 |
--------------------------------------------------------------------------------
/src/main/site/assets/build/js/vendor/jquery.flexnav.min.js:
--------------------------------------------------------------------------------
1 | /*! flexnav https://github.com/indyplanets/flexnav http://unlicense.org/ 2013-11-28 */
2 | !function(){var a;a=jQuery,a.fn.flexNav=function(b){var c,d,e,f,g,h,i,j,k,l,m,n;return k=a.extend({animationSpeed:250,transitionOpacity:!0,buttonSelector:".menu-button",hoverIntent:!1,hoverIntentTimeout:150,calcItemWidths:!1,hover:!0},b),c=a(this),c.addClass("with-js"),k.transitionOpacity===!0&&c.addClass("opacity"),c.find("li").each(function(){return a(this).has("ul").length?a(this).addClass("item-with-ul").find("ul").hide():void 0}),k.calcItemWidths===!0&&(d=c.find(">li"),f=d.length,h=100/f,g=h+"%"),c.data("breakpoint")&&(e=c.data("breakpoint")),l=function(){return c.hasClass("lg-screen")===!0&&k.hover===!0?k.transitionOpacity===!0?a(this).find(">ul").addClass("flexnav-show").stop(!0,!0).animate({height:["toggle","swing"],opacity:"toggle"},k.animationSpeed):a(this).find(">ul").addClass("flexnav-show").stop(!0,!0).animate({height:["toggle","swing"]},k.animationSpeed):void 0},i=function(){return c.hasClass("lg-screen")===!0&&a(this).find(">ul").hasClass("flexnav-show")===!0&&k.hover===!0?k.transitionOpacity===!0?a(this).find(">ul").removeClass("flexnav-show").stop(!0,!0).animate({height:["toggle","swing"],opacity:"toggle"},k.animationSpeed):a(this).find(">ul").removeClass("flexnav-show").stop(!0,!0).animate({height:["toggle","swing"]},k.animationSpeed):void 0},j=function(){var b;if(a(window).width()<=e)return c.removeClass("lg-screen").addClass("sm-screen"),k.calcItemWidths===!0&&d.css("width","100%"),b=k.buttonSelector+", "+k.buttonSelector+" .touch-button",a(b).removeClass("active"),a(".one-page li a").on("click",function(){return c.removeClass("flexnav-show")});if(a(window).width()>e){if(c.removeClass("sm-screen").addClass("lg-screen"),k.calcItemWidths===!0&&d.css("width",g),c.removeClass("flexnav-show").find(".item-with-ul").on(),a(".item-with-ul").find("ul").removeClass("flexnav-show"),i(),k.hoverIntent===!0)return a(".item-with-ul").hoverIntent({over:l,out:i,timeout:k.hoverIntentTimeout});if(k.hoverIntent===!1)return a(".item-with-ul").on("mouseenter",l).on("mouseleave",i)}},a(k.buttonSelector).data("navEl",c),n=".item-with-ul, "+k.buttonSelector,a(n).append('▼'),m=k.buttonSelector+", "+k.buttonSelector+" .touch-button",a(m).on("click",function(b){var c,d,e;return a(m).toggleClass("active"),b.preventDefault(),b.stopPropagation(),e=k.buttonSelector,c=a(this).is(e)?a(this):a(this).parent(e),d=c.data("navEl"),d.toggleClass("flexnav-show")}),a(".touch-button").on("click",function(){var b,d;return b=a(this).parent(".item-with-ul").find(">ul"),d=a(this).parent(".item-with-ul").find(">span.touch-button"),c.hasClass("lg-screen")===!0&&a(this).parent(".item-with-ul").siblings().find("ul.flexnav-show").removeClass("flexnav-show").hide(),b.hasClass("flexnav-show")===!0?(b.removeClass("flexnav-show").slideUp(k.animationSpeed),d.removeClass("active")):b.hasClass("flexnav-show")===!1?(b.addClass("flexnav-show").slideDown(k.animationSpeed),d.addClass("active")):void 0}),c.find(".item-with-ul *").focus(function(){return a(this).parent(".item-with-ul").parent().find(".open").not(this).removeClass("open").hide(),a(this).parent(".item-with-ul").find(">ul").addClass("open").show()}),j(),a(window).on("resize",j)}}.call(this);
--------------------------------------------------------------------------------
/src/main/markdown/articles/elemental.md:
--------------------------------------------------------------------------------
1 | Elemental
2 | ===
3 |
4 | _Ray Cromwell, Senior Software Engineer_
5 |
6 | _Updated June 2012_
7 |
8 | Elemental is a new library for fast, lightweight, and "to the metal" web programming in GWT.
9 | It's intended for developers who are comfortable working with the browser API's that JavaScript
10 | programmers use. We think it will be an excellent 'thin' library for both mobile and desktop web
11 | applications.
12 |
13 | ## What's In It?
14 |
15 | Elemental includes every HTML5 feature, including DOM access of course, but also
16 | bleeding edge features like WebGL, WebAudio, WebSockets, WebRTC, Web Intents, Shadow DOM,
17 | the File API, and more. We can do this because we generate Java code directly from the WebIDL
18 | files used by JavaScript engines.
19 |
20 | Elemental also includes high-performance collections and a new JSON library. These libraries
21 | work equally well in a browser or in a server (JVM) environment.
22 |
23 | ## Performance
24 |
25 | Elemental is designed to allow the GWT compiler to generate high-performance JavaScript with no
26 | overhead. It does this by using only
27 | [JavaScript overlay types.](../doc/latest/DevGuideCodingBasicsOverlay.html). Also,
28 | the collection classes map directly to underlying JavaScript collections with no overhead.
29 |
30 | ## Example Usage
31 |
32 | Elemental uses Java interfaces to hide most of the generated overlay types it uses. JS APIs instances
33 | can be obtained by the `Window` or `Document` interfaces. Here is a simple example to play a sound using
34 | the Web Audio API.
35 |
36 | ```java
37 | package com.myapp;
38 | import elemental.client.*;
39 | import elemental.dom.*;
40 | import elemental.html.*;
41 |
42 | public class ElementalExample implements EntryPoint {
43 | public void onModuleLoad() {
44 | Window window = Browser.getWindow();
45 | AudioContext audioContext = window.newAudioContext();
46 | Oscillator osc = audioContext.createOscillator();
47 | osc.setType(Oscillator.SQUARE);
48 | osc.connect((AudioParam) audioContext.getDestination(), 0);
49 | osc.getFrequency().setValue(440.0f);
50 | osc.noteOn(0);
51 | }
52 | }
53 | ```
54 |
55 | In general, HTML elements can be constructed by invoking methods starting with the pattern
56 | `Document.createXXXElement` where XXX could be elements like `Select`,
57 | or `Video`. JS APIs which allow the `new` keyword to construct instances
58 | are found on `Window.newXXX` where XXX represents the underlying Javascript
59 | constructor name.
60 |
61 | ## Caveats
62 |
63 | Elemental is a work in progress. Due to the nature of it being auto-generated from IDL specifications,
64 | and those specifications for HTML5 changing rapidly over time, there are no unit tests for
65 | generated code, and usage of bleeding edge HTML5 are untested and may break.
66 |
67 | Elemental also introduces a new set of native JS collections which are not interoperable with Java
68 | Collections.
69 |
70 | Currently, Elemental is generated from the WebKit IDL files and contains many references to
71 | vendor-prefixed browser extensions. Using these draft-spec extensions may result in code that doesn't
72 | work on Firefox, Opera, or IE. Later versions of Elemental will include shim-generation
73 | to force generated code to use the non-vendor prefixed APIs across all browsers.
74 |
--------------------------------------------------------------------------------
/src/main/markdown/doc/latest/DevGuideCodingBasicsClient.md:
--------------------------------------------------------------------------------
1 | Client
2 | ===
3 |
4 | Your application is sent across a network to a user where it runs as JavaScript inside their web browser. Everything that happens within the user's web browser is
5 | referred to as _client-side processing_. When you write client-side code that is intended to run in the web browser, remember that it ultimately becomes JavaScript. Thus, it
6 | is important to use only [libraries and Java language constructs](DevGuideCodingBasics.html#DevGuideJavaCompatibility) that can be translated into JavaScript.
7 |
8 | 1. [Creating an EntryPoint Class](#creating)
9 | 2. [Hello World Example](#hello)
10 |
11 | ## Creating an EntryPoint Class
12 |
13 | To begin writing a GWT module, subclass the [EntryPoint](/javadoc/latest/com/google/gwt/core/client/EntryPoint.html) class.
14 |
15 | **Tip:** GWT applicationCreator creates a starter application for you with a sample EntryPoint subclass defined.
16 |
17 | ```java
18 | package com.example.foo.client;
19 |
20 | import com.google.gwt.core.client.EntryPoint;
21 | import com.google.gwt.core.client.GWT;
22 |
23 | /**
24 | * Entry point classes define onModuleLoad().
25 | */
26 | public class Foo implements EntryPoint {
27 |
28 | /**
29 | * This is the entry point method. Initialize you GWT module here.
30 | */
31 | public void onModuleLoad() {
32 |
33 | // Writes Hello World to the module log window.
34 | GWT.log("Hello World!", null);
35 | }
36 | }
37 | ```
38 |
39 | ### Writing the entry point method
40 |
41 | The entry point method is onModuleLoad(). It contains the code that executes when you launch the application. Typically, the types of things you do in the onModuleLoad() method
42 | are:
43 |
44 | * create new user interface components
45 | * set up [handlers](DevGuideUiHandlers.html) for events
46 | * modify the browser DOM in some way
47 |
48 | The example above logs a message to the development mode console.
49 | If you try to run this example application in production mode, you won't see anything because the GWT.log() method is compiled away when the client-side code is translated into JavaScript.
50 |
51 | ## Hello World Example
52 |
53 | Included with the GWT distribution is a sample "Hello World"
54 | program that looks like this when run in development mode:
55 |
56 | 
57 |
58 | ```java
59 | package com.google.gwt.sample.hello.client;
60 |
61 | import com.google.gwt.core.client.EntryPoint;
62 | import com.google.gwt.event.dom.client.ClickEvent;
63 | import com.google.gwt.event.dom.client.ClickHandler;
64 | import com.google.gwt.user.client.Window;
65 | import com.google.gwt.user.client.ui.Button;
66 | import com.google.gwt.user.client.ui.RootPanel;
67 | import com.google.gwt.user.client.ui.Widget;
68 |
69 | /**
70 | * Hello World application.
71 | */
72 | public class Hello implements EntryPoint {
73 |
74 | public void onModuleLoad() {
75 | Button b = new Button("Click me", new ClickHandler() {
76 | public void onClick(ClickEvent event) {
77 | Window.alert("Hello, AJAX");
78 | }
79 | });
80 |
81 | RootPanel.get().add(b);
82 | }
83 | }
84 | ```
85 |
86 | In the entry point method for the Hello World application, the following actions were taken:
87 |
88 | * a new Button widget was created with the text "Click me"
89 | * a handler was created to respond to the user clicking the button
90 | * the handler pops up an Alert dialog
91 | * the button is added to the [Root panel](/javadoc/latest/com/google/gwt/user/client/ui/RootPanel.html)
92 |
--------------------------------------------------------------------------------
/src/main/java/com/google/gwt/site/markdown/toc/TocFromMdCreator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.google.gwt.site.markdown.toc;
15 |
16 | import com.google.gwt.site.markdown.fs.MDNode;
17 | import com.google.gwt.site.markdown.fs.MDParent;
18 |
19 | import java.util.Arrays;
20 | import java.util.List;
21 |
22 | public class TocFromMdCreator implements TocCreator {
23 |
24 | public String createTocForNode(MDParent root, MDNode node) {
25 |
26 | StringBuffer buffer = new StringBuffer();
27 | buffer.append(" \n");
28 | render(root, buffer, node);
29 | buffer.append("
\n");
30 |
31 | return buffer.toString();
32 | }
33 |
34 | private void render(MDNode node, StringBuffer buffer, MDNode tocNode) {
35 |
36 | MDNode tmpNode = tocNode;
37 | while (tmpNode.getParent() != null) {
38 | if (tmpNode.isExcludeFromToc())
39 | return;
40 | tmpNode = tmpNode.getParent();
41 | }
42 |
43 | tmpNode = node;
44 | while (tmpNode.getParent() != null) {
45 | if (tmpNode.isExcludeFromToc())
46 | return;
47 | tmpNode = tmpNode.getParent();
48 | }
49 |
50 | // Use 4 spaces to indent 's, so as we have room for indenting 's
51 | String margin = spaces(4 * node.getDepth());
52 |
53 | if (node.isFolder()) {
54 | MDParent mdParent = node.asFolder();
55 |
56 | if (node.getDepth() != 0) {
57 | buffer.append(margin).append("- ");
58 | buffer.append("");
59 | buffer.append(node.getDisplayName());
60 | buffer.append("\n");
61 | buffer.append(margin).append("
\n");
62 | }
63 |
64 | List children = mdParent.getChildren();
65 | for (MDNode child : children) {
66 | render(child, buffer, tocNode);
67 | }
68 |
69 | if (node.getDepth() != 0) {
70 | buffer.append(margin).append("
\n");
71 | buffer.append(margin).append(" \n");
72 | }
73 | } else {
74 | StringBuffer relativeUrl = new StringBuffer();
75 | if (tocNode.getDepth() > 0) {
76 | for (int i = 1; i < tocNode.getDepth(); i++) {
77 | relativeUrl.append("../");
78 | }
79 | }
80 |
81 | StringBuffer absoluteUrl = new StringBuffer();
82 | absoluteUrl.append("/");
83 | absoluteUrl.append(node.getRelativePath());
84 |
85 | relativeUrl.append(node.getRelativePath());
86 |
87 | buffer.append(margin).append("- ");
88 | // TODO escape HTML
89 | buffer.append("")
92 | .append(node.getDisplayName()).append("");
93 | buffer.append("
\n");
94 | }
95 | }
96 |
97 | private String spaces(int count) {
98 | final byte[] spaceBytes = new byte[count];
99 | Arrays.fill(spaceBytes, (byte) ' ');
100 | return new String(spaceBytes);
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/src/main/markdown/overview.md:
--------------------------------------------------------------------------------
1 | Overview
2 | ===
3 |
4 | GWT is a development toolkit for building and optimizing complex browser-based applications. Its goal is to enable productive development of high-performance web applications without the developer having to be an expert in browser quirks, XMLHttpRequest, and JavaScript. It's open source, completely free, and used by thousands of developers around the world.
5 |
6 | [What's New in GWT 2.12.2](release-notes.html#Release_Notes_2_12_2)
7 |
8 | ## What's inside the toolbox?
9 |
10 | ### SDK
11 |
12 | The [GWT SDK](learnmore-sdk.html) contains the Java API libraries, compiler, and development server. It lets you write client-side applications in Java and deploy them as JavaScript.
13 |
14 | * [Get Started](gettingstarted-v2.html)
15 | * [Tutorials](doc/latest/tutorial/index.html)
16 | * [Developer Guide](doc/latest/DevGuide.html)
17 |
18 | ### Plugin for Eclipse
19 |
20 | The [Plugin for Eclipse](https://developers.google.com/eclipse/index) provides IDE support for GWT and App Engine web projects.
21 |
22 | * [Get Started](usingeclipse.html)
23 |
24 | ## Developing with GWT
25 |
26 | ### Write
27 |
28 | The GWT SDK provides a set of core Java APIs and Widgets. These allow you to write AJAX applications in Java and then compile the source to highly optimized JavaScript that runs across all browsers, including mobile browsers for Android and the iPhone.
29 |
30 | Constructing AJAX applications in this manner is more productive thanks to a higher level of abstraction on top of common concepts like DOM manipulation and XHR communication.
31 |
32 | You aren't limited to pre-canned widgets either. Anything you can do with the browser's DOM and JavaScript can be done in GWT, including interacting with hand-written JavaScript.
33 |
34 | ### Debug
35 |
36 | You can debug AJAX applications in your favorite IDE just like you would a desktop application, and in your favorite browser just like you would if you were coding JavaScript. The GWT developer plugin spans the gap between Java bytecode in the debugger and the browser's JavaScript.
37 |
38 | Thanks to the GWT developer plugin, there's no compiling of code to JavaScript to view it in the browser. You can use the same edit-refresh-view cycle you're used to with JavaScript, while at the same time inspect variables, set breakpoints, and utilize all the other debugger tools available to you with Java. And because GWT's development mode is now in the browser itself, you can use browser dev tools as you code in Java.
39 |
40 | ### Optimize
41 |
42 | GWT contains two powerful tools for creating optimized web applications. The GWT compiler performs comprehensive optimizations across your codebase — in-lining methods, removing dead code, optimizing strings, and more. By setting split-points in the code, it can also segment your download into multiple JavaScript fragments, splitting up large applications for faster startup time.
43 |
44 | Performance bottlenecks aren't limited to JavaScript. Browser layout and CSS often behave in strange ways that are hard to diagnose. Speed Tracer is a new Chrome Extension in GWT that enables you to diagnose performance problems in the browser.
45 |
46 | ### Run
47 |
48 | When you're ready to deploy, GWT compiles your Java source code into optimized, stand-alone JavaScript files that automatically run on all major browsers, as well as mobile browsers for Android and the iPhone.
49 |
50 | ## Ready to get started?
51 |
52 | [Download the SDK](gettingstarted-v2.html) and get a simple web application up and running. From there, work through the fundamentals of GWT development with the in-depth [tutorials](doc/latest/tutorial/index.html).
53 |
--------------------------------------------------------------------------------
/src/main/markdown/index.md:
--------------------------------------------------------------------------------
1 | GWT
2 | ===
3 | GWT (pronounced 'gwit') is the official open source project for GWT releases 2.5 and onwards. This site houses links to the documentation, source code repository, issues list and information related to GWT roadmap and release. It is intended for developers interested in contributing to GWT, and for keeping people informed on new and upcoming changes to GWT, GWT related events and other news.
4 |
5 | GWT (pronounced 'gwit') is the official open source project for GWT releases 2.7 and onwards. This site houses links to the documentation, source code repository, issues list and information related to GWT roadmap and release. It is intended for developers interested in contributing to GWT, and for keeping people informed on new and upcoming changes to GWT, GWT related events and other news.
6 |
7 | Productivity for developers, performance for users
8 |
9 | GWT is a development toolkit for building and
10 | optimizing complex browser-based applications.
11 | It's open source, completely free, and used by thousands of enthusiastic developers
12 | around the world.
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | Learn about GWT, the features and tools it offers, and how you can quickly develop high-performance AJAX applications across all major browsers.
27 |
28 |
29 | |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
39 |
40 | Download and install the tools in GWT, including the
41 | SDK, Speed Tracer, and the Google Plugin for Eclipse.
42 |
43 |
44 | |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | Walk through the first steps needed to get a web application up and running. From there, work through the fundamentals of GWT development with an in-depth tutorial.
55 |
56 |
57 | |
58 |
59 |
60 |
61 |
62 |
64 |
65 |
66 |
67 |
68 | Everything you need to know about how to use GWT.
69 |
70 |
71 | |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/src/main/markdown/doc/latest/DevGuideUiImageBundles.md:
--------------------------------------------------------------------------------
1 | UiImageBundles
2 | ===
3 |
4 | An _image bundle_ is a construct used to improve application performance by reducing the number of round trip HTTP requests to the server to fetch images. GWT can package
5 | many image files into a single large file to be downloaded from the server and managed as a Java object.
6 |
7 | ## ClientBundles Make Using Images More Efficient
8 |
9 | Typically, an application uses many small images for icons. In HTML, each image is stored in a separate file and the browser is asked to download each file from the web server
10 | as a separate HTTP transaction. This standard way of dealing with images can be wasteful in several ways:
11 |
12 | * **Large overhead:** In a standard web application, an HTTP request has to be sent to the server for each image. In many cases, those images are icons and the
13 | actual image size is very small. In that case, the size of the image is often smaller than the HTTP response header that is sent back with the image data. That means that most of
14 | the traffic is overhead and very little of it actual content.
15 |
16 | * **Useless freshness checks:** Traditional image handling is wasteful in other ways too. Even when the images have been cached by the client, a 304 ("Not
17 | Modified") request is still sent to check and see if the image has changed. Since images change infrequently, these freshness checks are also wasteful.
18 |
19 | * **Blocking HTTP connections:** Furthermore, HTTP 1.1 requires browsers to limit the number of outgoing HTTP connections to two per domain/port. A multitude of
20 | image requests will tie up the browser's available connections, which blocks the application's RPC requests. In most applications, RPC requests are the real work that the
21 | application needs to do.
22 |
23 | The end result of sending out many separate requests and freshness checks is slow application startup.
24 |
25 | The GWT [ImageResource](DevGuideClientBundle.html#ImageResource) solves these problems. Multiple `ImageResources` are declared in a single `ClientBundle`, which is a composition of many images into a single image, along with an interface for accessing the individual
26 | images from within the composite. Users can define a `ClientBundle` that contains the images used by their application, and GWT will automatically create the composite image and
27 | provide an implementation of the interface for accessing each individual image. Instead of a round trip to the server for each image, only one round trip to the server for the
28 | composite image is needed.
29 |
30 | Because the filename of the composite image is based on a hash of the file's contents, the filename will change only if the composite image is changed. This means that it is
31 | safe for clients to cache the composite image permanently, which avoids the unnecessary freshness checks for unchanged images. To make this work, the server configuration needs to
32 | specify that composite images never expire. In addition to speeding up startup, image bundles prevent the "bouncy" effect of image loading in browsers. While images are loading,
33 | browsers put a standard placeholder for each image in the UI. The placeholder is a standard size because the browser does not know what the size of an image is until it has been
34 | fully downloaded from the server. The result is a 'bouncy' effect, where images 'pop' into the UI once they are downloaded. With image bundles, the size of each individual image
35 | within the bundle is discovered when the bundle is created, so the size of the image can be explicitly set whenever images from a bundle are used in an application.
36 |
37 | See the [ImageBundle
38 | API documentation](/javadoc/latest/com/google/gwt/user/client/ui/ImageBundle.html) for important information regarding:
39 |
40 | * A potential security issue with the generation of the composite image on certain versions of the JVM
41 | * Caching recommendations for image bundle files
42 | * Protecting image bundle files with web application security constraints
43 | * Using image bundles with the HTTPS protocol
44 |
--------------------------------------------------------------------------------
/src/main/markdown/doc/latest/DevGuide.md:
--------------------------------------------------------------------------------
1 | Developer's Guide
2 | ===
3 |
4 | Welcome to the GWT Developer's Guide.
5 | This guide introduces the key concepts, tools, and libraries you'll encounter when building web applications with GWT.
6 | The topics in this guide span project organization, coding, debugging, testing, optimizing, and publishing your web application.
7 |
8 | **Note** - If you're new to GWT and eager to start playing immediately, you might want to try the Quick Start. For specific technical details, see the Reference guide and Articles.
9 |
10 | ## Tutorials
11 |
12 | 1. [Create, build and run a GWT application](tutorial/gettingstarted.html) — Create, build, debug and compile a sample application.
13 | 2. [Communicating with the server](tutorial/clientserver.html) — Add an asynchronous call to a web server using GWT RPC or JSON, serialize Java objects, and handle exceptions
14 | 3. [Internationalizing a GWT application](tutorial/i18n.html) — Translate the user interface of a GWT application into another language
15 | 4. [Unit testing with JUnit](tutorial/JUnit.html) — Add unit tests to a GWT application using JUnit
16 | 5. [Deploying to Google App Engine](tutorial/appengine.html) — Deploy a GWT application to App Engine
17 |
18 | ## Developer Guide
19 |
20 | 1. [Organize Projects](DevGuideOrganizingProjects.html) — Describes conventions to identify which code is intended to run on the client browser, the server, or both
21 | 2. [Compile & Debug](DevGuideCompilingAndDebugging.html) — Describes development and production modes
22 | 3. [Coding Basics](DevGuideCodingBasics.html) — Describes GWT programming fundamentals
23 | 4. [Build User Interfaces](DevGuideUi.html) — How to work with widgets, panels, the DOM, events, CSS, declarative UI and images. Cell widgets / Editors - 2.1, Cell tables - 2.2
24 | 5. [HTML5 Feature Support](DevGuideHtml5.html) 2.3 — Describes GWT support for HTML5 features, such as Storage, Canvas, Audio, Video, drag and drop, and so forth.
25 | 6. [Security for GWT Applications](../../articles/security_for_gwt_applications.html) - How to secure your GWT applications against JavaScript attacks
26 | 7. [Security: Safe HTML](DevGuideSecuritySafeHtml.html) 2.1 — Describes coding guidelines that prevent a large class of Cross-Site-Scripting (XSS) vulnerabilities
27 | 8. [Security: GWT RPC XSRF protection](DevGuideSecurityRpcXsrf.html) 2.3 — Describes how to prevent Cross-Site Request Forgery (XSRF or CSRF) vulnerabilities in GWT RPCs
28 | 9. [MVP Framework](DevGuideMvpActivitiesAndPlaces.html) 2.1 — Sample app and documentation showing how to use Activities, Places, and the EventBus.
29 | 10. [RequestFactory](DevGuideRequestFactory.html) 2.1 — Guide to creating data-oriented services using RequestFactory and EntityProxy classes.
30 | 11. [Logging](DevGuideLogging.html) 2.1 — Describes how to log events in client-side code in GWT applications.
31 | 12. [Accessibility](DevGuideA11y.html) 2.5 — Describes features that enable screen readers to interpret what is displayed on the screen for a visually impaired user
32 | 13. [Internationalization](DevGuideI18n.html) — Describes a flexible set of tools to help you internationalize your applications and libraries
33 | 14. [Communicate with a Server](DevGuideServerCommunication.html) — Describes a couple of different ways to communicate with a server via HTTP
34 | 15. [Test with JUnit](DevGuideTesting.html) — Describes how to use the JUnit unit testing framework and Emma code coverage tool
35 | 16. [Deploy](DevGuideDeploying.html) — Describes how to deploy both client- and server-side JavaScript
36 | 17. [Optimize](DevGuideOptimizing.html) — Describes how to improve the performance of your application
37 | 18. [IE9 Support - Tips and Tricks](DevGuideIE9.html) 2.3 - Support for Internet Explorer 9
38 | 19. [Reference](RefGuide.html) — Provides javadoc for GWT and related libraries and technical details for GWT widgets
39 | 20. [FAQ](FAQ.html) — Frequently asked questions
40 | 21. [Glossary](DevGuideGlossary.html) — GWT terminology
41 |
42 |
43 |
--------------------------------------------------------------------------------
/src/main/markdown/doc/latest/tutorial/gettingstarted.md:
--------------------------------------------------------------------------------
1 | Build a GWT app: Introduction
2 | ===
3 |
4 | In this tutorial, you'll write this simple AJAX application, StockWatcher.
5 |
6 | Go ahead and try StockWatcher out. Add a few stock codes and see how it works.
7 |
8 |
10 |
11 | In the process of building StockWatcher, you'll learn how GWT provides the tools for you to:
12 |
13 | * Write browser applications in Java using the Java IDE of your choice
14 | * Debug Java in GWT development mode
15 | * Cross-compile your Java code into highly optimized JavaScript
16 | * Maintain one code base (Java) for multiple browser implementations (JavaScript)
17 |
18 | ### AJAX application development process using GWT
19 |
20 | This Build a Sample GWT Application tutorial is divided into 8 sections following a typical application development cycle. Each section builds on the previous sections. In this basic implementation of StockWatcher, all functionality is coded on the client-side. Server-side coding and client/server communications are covered in [other tutorials](index.html).
21 |
22 | | Tasks: What you'll do | Concepts: What you'll learn | GWT Tools and APIs: What you'll use |
23 | | ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
24 | | 1. [Create a GWT Project](create.html) | Generate the files and directories you need to get started. | Google Plugin for Eclipse; GWT command-line tool webAppCreator; Development Mode |
25 | | 2. [Design the Application](design.html) | Identify requirements, constraints, and implementation strategies. | Language constraints |
26 | | 3. [Build the User Interface](buildui.html) | Lay out the visual design and add user interface components. | GWT widgets and panels, the Root panel |
27 | | 4. [Manage Events on the Client](manageevents.html) | Handling mouse and keyboard events. | ClickHandler and KeyPressHandler interfaces |
28 | | 5. [Code Functionality on the Client](codeclient.html) | Maintain one code base for multiple browser implementations. Leveraging your Java IDE's features such as refactoring and code completion. | various GWT methods |
29 | | 6. [Debug a GWT Application](debug.html) | Debug the Java code before compiling it into JavaScript. Leverage your Java IDE's debugging tools by running the application in development mode. | Development Mode |
30 | | 7. [Apply Style](style.html) | Apply visual style to the application. Define the visual style in CSS. Set the class attributes on HTML elements programmatically. Change styles dynamically. Include static elements, such as image files. | GWT module; GWT themes; application style sheet; GWT methods: addStyleName, addStyleDependentName, setStyleName; automatic resource inclusion |
31 | | 8. [Compile a GWT Application](compile.html) | Compile your client-side Java code into JavaScript. Test in production mode. Learn about the benefits of deferred binding. | GWT compiler |
32 |
33 | ## What's Next
34 |
35 | If you have not set up your development environment with the Java SDK, a Java IDE such as Eclipse, and the latest distribution of Google Web Toolkit, do that [before you begin](index.html#prerequisites).
36 |
37 | You're ready to create a GWT project.
38 |
39 | [Step 1: Creating a GWT Project](create.html)
40 |
--------------------------------------------------------------------------------
/src/main/markdown/lifeofanissue.md:
--------------------------------------------------------------------------------
1 | Life of an issue
2 | ===
3 |
4 | The GWT project maintains a [public issue tracker](https://github.com/gwtproject/gwt/issues) where you can report bugs and request features for GWT.
5 |
6 | 1. [Issue reporting guidelines](#guide)
7 | 2. [What happens when you submit an issue](#life)
8 |
9 | ## Issue reporting guidelines
10 |
11 | One of the best ways you can help us improve GWT is to let us know about any problems you find with it.
12 |
13 | Here's how to report issues:
14 |
15 | 1. [Search for your issue](https://github.com/gwtproject/gwt/issues?q=is%3Aissue) to see if anyone has already reported it.
16 | 2. If no one's reported your issue, [file it](https://github.com/gwtproject/gwt/issues/new). Please provide the versions of GWT, the browser(s), and the platform(s) used. It is especially important to provide the browser version(s) and a small code sample which can be used to reproduce the issue. If the issue has been discussed in forums, please provide a link to the discussion too.
17 |
18 | To see what happens to your issue once you report it, keep reading.
19 |
20 | ## What happens when you submit an issue
21 |
22 | Here's the Life of an Issue, in a nutshell:
23 |
24 | 1. An issue is filed.
25 | 2. A GWT contributor periodically reviews and triages issues. The GWT contributor attempts to verify the issue and assigns a status based on the results.
26 | 3. Once an issue has been verified, it may be marked Accepted, in which case the GWT team plans to fix it, or PatchesWelcome, which means that the GWT team likely won't be able to get to it, but would be happy to review patches from the community. To submit a patch, follow [these guidelines](makinggwtbetter.html#submittingpatches).
27 | 4. Once an issue has been fixed, it'll be closed and assigned to a milestone, indicating whether the fix is available in the current numbered release or, more commonly, in the Git main branch for the next release.
28 |
29 | The following tables provide detail on all issue status types.
30 |
31 | ### Open Issues
32 |
33 |
34 |
35 |
36 | | Status |
37 | Description |
38 |
39 |
40 | |
41 | Issue has not had initial review yet |
42 |
43 |
44 | | Accepted |
45 | Problem reproduced / Need acknowledged |
46 |
47 |
48 | | Started |
49 | Work on this issue has begun |
50 |
51 |
52 | | PatchesWelcome |
53 | Confirmed and triaged, but not assigned. Feel free to submit patches for review. |
54 |
55 |
56 | | ReviewPending |
57 | Commit gated by code review |
58 |
59 |
60 | | NeedsInfo |
61 | Additional information is required from submitter |
62 |
63 |
64 |
65 |
66 | Closed Issues
67 |
68 |
69 |
70 | | Status |
71 | Description |
72 |
73 |
74 | |
75 | Fixed in associated milestone (could be a future release of GWT) |
76 |
77 |
78 | | NotPlanned |
79 | No current plans to address this issue |
80 |
81 |
82 | | Invalid |
83 | This was not a valid issue report (e.g. illegible, spam, does not describe a real issue) |
84 |
85 |
86 | | AssumedStale |
87 | Assumed (perhaps incorrectly) to no longer be a problem; please reconfirm with latest release |
88 |
89 |
90 | | AsDesigned |
91 | The feature is behaving as intended |
92 |
93 |
94 | | KnownQuirk |
95 | Not denying it's a real issue, but likely a browser quirk beyond our control to fix efficiently |
96 |
97 |
98 | | Duplicate |
99 | This report duplicates an existing issue |
100 |
101 |
102 | | CannotReproduce |
103 | The issue could not be reproduced based on the report |
104 |
105 |
106 |
107 |
108 | ## Other Stuff
109 |
110 | The states and lifecycle above are how we generally try to track software. However, GWT contains a lot of software and gets a correspondingly large number of issues. As a result, sometimes issues don't make it through all the states in a formal progression. We do try to keep the system up to date, but we tend to do so in periodic "issue sweeps" where we review the database and make updates.
111 |
112 | Occasionally, we make tweaks to the list of issue states and the lifecycle described above. When we do this, we'll update this page as well.
113 |
--------------------------------------------------------------------------------