This widget displays an image at a given URL.
By default, the primary style name of a widget will be the default style name for its widget class. For example, gwt-Button for Button widgets. When we add and remove style names using AddStyleName() method, those styles are called secondary styles.
The final appearance of a widget is determined by the sum of all the secondary styles added to it, plus its primary style. You set the primary style of a widget with the setStylePrimaryName(String) method.
This provides name of the application.
This adds other gwt module in application just like import does in java applications. Any number of modules can be inherited in this manner.
By default, the class name for each component is gwt-<classname>. For example, the Button widget has a default style of gwt-Button and similar way TextBox widgest has a default style of gwt-TextBox.
It contains the actual program of a GWT application.
They are called sequentially in the order in which entry-point classes appear in the module file. So when the onModuleLoad() of your first entry point finishes, the next entry point is called immediately.
A module descriptor is the configuration file in the form of XML which is used to configure a GWT application. A module descriptor file extension is *.gwt.xml, where * is the name of the application and this file should reside in the project's root.
There are multiple approaches for associating CSS files with your module. Modern GWT applications typically use a combination of CssResource and UiBinder.
This widget can contain HTML text and displays the html content using a <div> element, causing it to be displayed with block layout.
The class UIObject is the superclass for all user-interface objects.
The most important public resource is host page which is used to invoke actual GWT application. A typical HTML host page for an application might not include any visible HTML body content at all but it is always expected to include GWT application via a <script.../> tag.
In order to use GWT History support, we must first embed following iframe into our host HTML page.
CellTree widget represents a view of a tree. This widget will only work in standards mode, which requires that the HTML page in which it is run have an explicit <!DOCTYPE> declaration.
Tree widget represents a standard hierarchical tree widget. The tree contains a hierarchy of TreeItems that the user can open, close, and select.
Following are the features of GWT −
HorizontalPanel widget represents a panel that lays all of its widgets out in a single horizontal column.
This method gets all of the object's style names, as a space-separated list.
RichTextArea widget represents a rich text editor that allows complex styling and formatting.
The logging framework emulates java.util.logging, so it uses the same syntax and has the same behavior as server side logging code.
GWT logging is configured using .gwt.xml files.
We can configure logging to be enabled/disabled; we can enable/disable particular handlers, and change the default logging level.
This method sets the object's primary style name and updates all dependent style names.
A GWT application consists of following four important parts out of which last part is optional but first three parts are mandatory −
This widget contains text, not interpreted as HTML using a <div>element, causing it to be displayed with block layout.
This method will add a secondary or dependent style name to the widget. A secondary style name is an additional style name that is,so if there were any previous style names applied they are kept.
The public path is the place in your project where static resources referenced by your GWT module, such as CSS or images, are stored.
Button widget represents a standard push button.
Panel is the abstract base class for all panels, which are widgets that can contain other widgets.
Google Web Toolkit (GWT) is a development toolkit for building and optimizing complex browser-based applications. GWT is used by many products at Google, including Google AdWords and Orkut.
No! By default, neither the browser nor GWT creates default id attributes for widgets.
This specifies the names of source folders which GWT compiler will search for source compilation.
onModuleLoad() function gets called and acts similar to main method of a java application.
The class Widget is the base class for the majority of user-interface objects. Widget adds support for receiving events from the browser and being added directly to panels.
SuggestBox widget represents a text box or text area which displays a pre-configured set of selections that match the user's input. Each SuggestBox is associated with a single SuggestOracle. The SuggestOracle is used to provide a set of selections given a specific query string.
Layout Panels can contain other widgets. These panels controls the way widgets to be shown on User Interface. Every Panel widget inherits properties from Panel class which in turn inherits properties from Widget class and which in turn inherits properties from UIObject class.
This method will clear any existing styles and set the widget style to the new CSS class provided using style.
CellBrowser widget represents a browsable view of a tree in which only a single node per level may be open at one time. This widget will only work in standards mode, which requires that the HTML page in which it is run have an explicit <!DOCTYPE> declaration.
This method will remove given style from the widget and leaves any others associated with the widget.
Yes! Any number of entry-point classes can be added.
GWT compiler generates .nocache.js file every time with the same name whenever a GWT application is compiled. So browser should always download the .nocache.js file to get the latest gwt application. gwt.js code actually appends a unique timestamp at the end of the file name so that browser always treat it a new file and should never cache it.
Following are the core components of GWT −
JRE Emulation library − Google Web Toolkit includes a library that emulates a subset of the Java runtime library. The list includes java.lang, java.lang.annotation, java.math, java.io, java.sql, java.util and java.util.logging.
GWT UI building library − This part of GWT consists of many subparts which includes the actual UI components, RPC support, History management, and much more.
The default public path is the public subdirectory underneath where the Module XML File is stored.
This specifies the name of class which will start loading the GWT Application.
TextBox widget represents a single line text box.
A module entry-point is any class that is assignable to EntryPoint and that can be constructed without parameters. When a module is loaded, every entry point class is instantiated and its EntryPoint.onModuleLoad() method gets called.
This widget represents a simple <a> element.
Following are the steps of bootstrap proceure for GWT application when a browser loads the GWT application −
Automatically injects the external CSS file located at the location specified by src.