Category Archives: SWT

Gmail-alike Web Mail Client “WeMail”

Long time no post.

This time, I would like to introduce you Java2Script powered WeMail ( http://webuzz.im/mail/ ), a Gmail-alike web mail client. WeMail is a general web mail client for all POP/IMAP & SMTP mail providers. So it supports Gmail, Hotmail/Live Mail, Yahoo! Mail, AOL/AIM Mail and others.

WeMail currently provides Gmail demo accounts for demo: after the page is loaded, select “java2script.demo” or “java2script.talk” from email drop-down list and then login. You can compose and send new emails (Drafts are auto-saved). You can read and reply emails. Folder Drafts, Sent Mails, All Mails, Spam and Trash are supported. Setting, Search and Contact is not supported yet.

Screenshot of WeMail Web:
wemail-list

Screenshot of WeMail Desktop:
wemail-desktop

You can also visit WeMail development blog for more screenshots

WeMail is based on Java, JavaMail, SWT and Java2Script technologies, designed by Eclipse & WindowBuilder Pro. Here is WeMail development summary:

  • First, design WeMail using WindowsBuilder Pro designer. Designing UI takes a lot of the time.
  • Second, import JavaMail, separate email jobs into several Simple RPC classes and implement them using JavaMail API.
  • Third, run and debug WeMail as a normal desktop Java application. Everything is about native Java development.
  • Then, use Java2Script plugin to compile WeMail Java sources into JavaScript.
  • At last, “Running as Java2Script Application”, customize a few lines of the generated JavaScript.

Why implementing another Gmail-alike web mail client?

  1. People likes to see Google products powered by GWT’s Java to JavaScript technology. But there is no such GWT-powered Gmail by now. Java2Script powered Gmail-alike web mail client proves this concept. And it only takes less than 2 weeks.
  2. WeMail provides the abilities to use Gmail UI for other mail providers besides Gmail, like Hotmail or Yahoo! Mail. Gmail UI may increase people’s daily email processing efficiency.
  3. WeMail provides people another way for accessing to Gmail, Yahoo! Mail or other mail providers, in cases accessing to certain websites is blocked.

BTW: Along with development of WeMail, there are a few Java2Script updates (compiler bug-fixing and SWT library improvements). Please check it out.

Posted in Java, Java2Script News, Simple RPC, SWT, WindowBuilder Pro | Tagged , | Leave a comment

Java2Script Desktop

You may already know Web OS, like eyeOS. In fact, those web OSs are web desktop + web services. And there are lots of web desktop styles. And here we introduce Java2Script Desktop, basing on Java2Script SWT technology:

Click to view screen shot in full mode

There are four elements on the above screen shot: Tray Bar (left upper corner), Task Bar (left side), Quick Shortcut Bar (bottom), Window.

This is a prototype design for Java2Script Desktop. Please check it out at http://izuz.net/gtalk/ . Hope to hear your feedback.

Posted in Java2Script News, SWT, Uncategorized, User Experience | Tagged , , | Leave a comment

Eclipse RAP 1.0 Comes

Eclipse RAP team has just released its 1.0.

The RAP project enables developers to build rich, Ajax-enabled Web applications by using the Eclipse development model, plug-ins with the well known Eclipse workbench extenstion points, JFace, and a widget toolkit with SWT API (using qooxdoo for the client-side presentation). The project has graduated from incubation and released its 1.0 release.

In fact, Eclipse RAP and Java2Script have a lot in common. Both are based on SWT API and have goals to provide ways for developers to share the same base of code for products that deploy to the web and the desktop. Here is overview of Eclipse RAP. And you can also read Java2Script’s overview for comparisons.

And you can also check out Eclipse RAP demo to get more details. It’s interesting to see that RAP and Java2Script have 2 very similar demos: RAP’s RWT Control Demo and Java2Script’s SWT Control Examples.

More discussion may be found at ajaxian.com.

Related link: InfoWorld Eclipse offers AJAX server

Posted in AJAX, Java, Sharing, SWT | 2 Comments

Java2Script 1.0.0 Final Release

Here comes Java2Script 1.0.0 final release!

Please visit http://j2s.sourceforge.net/ for more information.

Feature List
==========

Java2Script Core
—————-
1. Object oriented JavaScript simulator is introduced
2. JavaScript ClassLoader is built inside
3. Eclipse JDT based Java to JavaScript compiler, support Java 1.4 and Java 5 features, including generic, enums, static imports, enhanced loops
4. Support incremental building for Java projects
5. Support Hotspot JavaScript swapping for debugging
6. Support most classes in java.lang.*, java.utils.* and others packages
7. Support native JavaScript through @j2s* Javadoc in Java sources
8. Support creating Java2Script projects by wizard, including Servlet project
9. Support loading *.js from Firefox Add-on.
10. Support Eclipse 3.1.*, 3.2.* and 3.3.*

Java2Script SWT
—————
1. Eclipse SWT 3.1 API is ported for JavaScript in modern browsers, Firefox, Internet Explorer, Opera, Safari
2. Window manager is built inside
3. Support UI blocking fow SWT’s Shell and Dialog
4. Support SWT deffered layout
5. Support detecting font size change in Firefox

Java2Script AJAX
—————-
1. HttpRequest/AJAX is introduced for both Java and JavaScript
2. Simple RPC API is introduced to call back Java server, which supports Cross Site Scripting
3. Support dynamic class loading for both Java and JavaScript
4. Support Java reflection (early implementation)

Java2Script JUnit
—————–
1. Support JUnit tests both Test Case and Test Suite in text mode.

Java2Script Example
——————-
1. Google Talk in JavaScript ( http://demo.java2script.org/gtalk/ )
2. SWT Control Examples ( http://demo.java2script.org/controls/ )

For more feature detailed description, please visit:
http://j2s.sourceforge.net/features.html

Posted in AJAX, Java, Java2Script News, JavaScript, RPC, Simple RPC, SWT | 2 Comments

Rewriting Java2Script’s GTalk

Here is an early screenshot:

Java2Script's GTalk

BTW: Window Builder Pro was used to design the above UI

For more updated information, please visit http://demo.java2script.org/gtalk/.

Posted in Screenshot, SWT, WindowBuilder Pro | Leave a comment

Instantiations Donated WindowBuilder Pro to Java2Script for Development

Instantiations is giving back to the community by donating its products for use by developers of Open Source projects. For more information, please visit http://www.instantiations.com/company/opensource.html

Java2Script is mainly focusing on converting SWT desktop applications. And WindowBuilder Pro is sure a professional GUI designer to help developers building SWT desktop applications. As from earlier trials ( http://j2s.sourceforge.net/screenshots.html#swt-designer ), I found that SWT Designer is a great tool to help designing SWT applications. In order to improve our development efficiencies, I decided to apply for a copy of WindowBuilder Pro instead of limited trial versions. And Eric Clayberg of Instantiations is very kind to give a quick reply and is very generous to donate WindowBuilder Pro to Java2Script team.

Thanks Instantiations Inc. I think WindowBuilder Pro will help us working more efficiently and improving Java2Script plugin to a higher quality level.

Posted in Java2Script News, SWT, WindowBuilder Pro | Leave a comment

Java2Script’s GTalk

I spent about three days writng an SWT based Google Talk client. And the client used Smack Jabber library, which has simple APIs. As writing the client, I kept the code compatible with Java2Script, which means that I can use the latest Java2Script daily release to pack it as a web servlet application and deploy it as rich internet application (RIA). Here is snapshot of Java2Script version of Google Talk:

Java2Script's GTalk

And here is the online Java2Script’s GTalk.

And because Java2Script’s SimpleRPC supports Cross Site Script, the above application can be loaded from any pages by adding the following HTML

Launch GoogleTalk

to your page.

Or you can just copy the above “javascript:…” part (without quotes) and paste it to address bar and go. You will get a Google Talk client (pure JavaScript) in your page (this page or other pages). This “javascript:…” part is considered as A Link An Application (ALAA).

By digging about Google Talk on Digg.com, I found that Google Talk Gadget on Google’s personalized homepage was really hitting the latest news.

Enjoy it.

Update:

The Java2Script’s Google Talk sources are available at SVN repository now:
http://j2s.svn.sourceforge.net/viewvc/j2s/trunk/demos/org.java2script.demo.gtalk/

And you can also download j2s-1.0.0-m5-gtalk.zip, unzip it and deploy gtalk.war to your Java servlet container.

Posted in A Link An Application, AJAX, ALAA, Java2Script News, RPC, Screenshot, Simple RPC, SWT | 2 Comments

Reload:A Link An Application

Copy following as a link and paste in your browser address bar (A new tab or a new window, or other existed tab page[Maybe a Google search result page, not this blog page]):

javascript:if(a="$wt.examples.controlexample.ControlExample@http://demo.java2script.org/org.eclipse.swt.examples/bin/",window["ClazzLoader"]!=null)$w$(a);else{var d=document,t="onreadystatechange",x=d.createElement("SCRIPT"),f=function(){var s=this.readyState;if(s==null||s=="loaded"||s=="complete"){$w$(a);}};x.src="http://archive.java2script.org/1.0.0-v20061220/j2slib.z.js";(typeof x[t]=="undefined")?x.onload=f:x[t]=f;d.getElementsByTagName("HEAD")[0].appendChild(x);void(0);}

According to your connection speed, it may take a few seconds before some Java2Script things come up. Enjoy it.

Replace the link’s “$wt.examples.controlexample.ControlExample @ http://demo.java2script.org/org.eclipse.swt.examples/bin/” with your Java2Script application URL. It’s class’s full name + @ + the class’s *.js bin root folder. If the URL is not very long (total javascript url string length < 500), it will be OK for modern browsers to load your application.

Posted in A Link An Application, AJAX, ALAA, JavaScript, Sharing, SWT | Leave a comment

Screenshot of Java2Script Web Notepad

I spent some time to enhance a web notepad with auto-save feature. Here is screenshot:

Java2Script Web Notepad

As a matter of security fact, it is not ready for public tests, so now I am not publishing the . Maybe later I will add more strict rules to the notepad so that no malicious modifications harm the system. Or maybe I will not take such a risk.

Actually, more desktop applications can be converted into rich internet applications. I even consider converting a terminal console into Java2Script web application is possible. But maybe I won’t do so.

Posted in AJAX, Java, RPC, Screenshot, Sharing, Simple RPC, SWT | Leave a comment

Java2Script SWT Widgets Updates

The updates mainly include Combo, Spinner, Menu, ToolBar and CoolBar. For more details, please check out latest sources from SVN, or stay tuned for 1.0.0 M4 scheduled in the next month.

Posted in Java2Script News, Screenshot, SWT | Leave a comment