With plain SWT it is not possible to create User Interfaces using native navigation concepts like the ActionBar or ViewControllers. Tabris provides a small UI framework on top of SWT that enables you to create UIs using these techniques. This framework is called “Tabris UI”. The key elements of Tabris UI are pages and actions. A user is able to navigate through your app by going back and forth between pages, while actions allow him to perform tasks on a page. Dive deeper and read the Tabris UI guide.
Video streaming is a key feature in today’s applications. Tabris enables users to play all video formats supported by their client. It’s possible to stream video directly from YouTube, Vimeo and other sources or to provide a video source of your own (e.g. using a servlet). The Video API is very compact, all you need is an URL of a video stream. The user can control playback, skipping, fullscreen etc. using the native media controls or you can create your own controls.
One of the most commonly used gestures on mobile devices is swiping. Swiping between different screens is the default navigation on the home screens of all major mobile operating systems. Tabris provides swiping with a simple to implement page-wise navigation feature. You simply have to add Controls to an ItemProvider to enable the navigation. You can dynamically add and remove items, lock the navigation on items and cache items on the client so that no server interaction is needed.
The SWT Canvas allows you to draw on an area. Tabris enhances this feature by providing a ClientCanvas. This special kind of Canvas allows a user to draw on a defined area. On the server side you can control colors, line width and so on by using the Canvas API. You can also receive notifications about drawings that happened on a user’s device.
The ClientDevice is a server side object that can be used to gather information about a user’s device. It informs about the client platform, device capabilities, timezone offset, device orientation, connection type or the locale. To react to changes you can receive notifications about changes in orientation or connection type.
The AppLauncher API enables tight integration between your Tabris app and common apps on your mobile device. Possible apps to communicate with are Mail, Maps, Messaging, Browser and others. To interact with another app you create an Options object containing parameters for the target app. It’s also possible to instruct the client to open an URL and let the user decide what app to use. Thereby it is also possible to open apps in a generic way.
When a Tabris application is sent to the background by the user, or activated again, an AppEvent gets raised. On the server side you can listen to those events to receive notifications. Listening to AppEvents enables a couple of use cases like locking the app or saving resources (turn off GPS).
When drawing custom components on the desktop using SWT, the Graphical Context API is the primary interface. RAP implements the Graphical Context API on the server and thus implements it in the Tabris clients as well. In this video, we used the Nebula Oscilloscope Widget to display a heartbeat monitor. Using the built-in push mechanism of RAP the monitor is continuously updated.
The Geolocation API is unique to Tabris, and is not part of SWT. In this demo we used the location of the device to show the user’s location. The results are displayed using standard SWT components e.g. Label and Browser. On the server side the location of a device is coupled to a user session which makes it possible to personalize UIs, for example with different languages or controls.
The dashboard shows German train information for given dates. The information is retrieved online from the OpenDataCity Train Monitor API. The data is processed on the server to obtain values such as the average delay for a specific train station or the maximum overall delay in Germany. There is also a play function that automatically browses through a series of data from various dates.
The JFace API provides a powerful data viewer that can be used to display large datasets. The viewer can be configured to lazily load only the data that needs to be displayed. This makes it possible to fill a tree with a very large dataset without having to send all data to the UI or to keep the entire data model in memory.
In this video we use a virtual tree to display the Enron Email Dataset which consists of about 500,000 emails.
The SWT API provides several input controls like text fields, combo boxes, date picker and many more. In this screencast we use a form to sign up for an imaginary flight using some input controls. By clicking the red button we execute an action on the server. The values entered are immediately accessible on the server.
SWT provides button controls such as push buttons, radio buttons, check buttons and several others. In this screencast we created a few miscellaneous buttons to demonstrate how to change the values of other widgets by listening to the button events. The video also shows how the UI can change on-the-fly without restarting the client.
The SWT API provides a Tree Control to render data in a hierarchy. This screencast shows a simple tree populated with some pseudo data. The transitions between the levels can be tracked on the server to react to UI state changes. In this demo we have implemented