Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Eclipse SWT Examples in JavaScript/Browser

Most of widget's look and feel is determined by your Desktop's theme.

If you want customized LAF, you need CSS injection.  Writing some *.css like :
.composite-default {
    background-color:white;
}
...
And load this CSS file into your web page.
You need to look into those *.css file in http://j2s.svn.sourceforge.net/viewvc/j2s/trunk/sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/widgets/ to customize your LAF.


Regards,
Zhou Renjian


On Sun, Dec 28, 2008 at 11:07 AM, Felipe Santos Andrade <lipeandrade@xxxxxxxxx> wrote:
Seems very cool.

What about the Look and Feel, as it is rendered by the Browser, would the application determine it self aspect or by default it will be Windows based?



On Sat, Dec 27, 2008 at 11:32 PM, Zhou Renjian <zhourenjian@xxxxxxxxx> wrote:
Hi,

I think some of you may like the idea of running a _javascript_ copy of SWT application inside modern browsers without using JRE. Here is "Eclipse SWT Examples" demo:

http://demo.java2script.org/controls/

The loading for the first time visitors may seem a little long to wait. The second loading would be much faster. Enjoy it.

The demo is directly compiled into _javascript_ basing on the same code base of  Eclipse SWT Examples' Java sources, using Java2Script plugin ( http://j2s.sourceforge.net/ ). Only a few lines of the sources are modified, adding lazy loading and lazy initializing mechanism to avoid browser freezing while still runing correctly as native Java application. _javascript_'s performance is not as good as native Java, such asynchronous lazy mechanisms are necessary for browser.

Most of SWT widgets in org.eclipse.swt.widgets.* are already ported to browser. Please check it out the sources at http://j2s.svn.sourceforge.net/viewvc/j2s/trunk/sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/widgets/

For more information about Java2Script, please visit http://j2s.sourceforge.net/ and http://demo.java2script.org/ .

BTW: You may like to visit http://www.eclipse.org/rap/ for information about Eclipse RAP's RWT.

Regards,
Zhou Renjian

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev



_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev



Back to the top