Home
.. Links
.. Search
.. Plugins
.. Help
.. Irc Faq

Projects
.. Platform/Faq
.. JDT/Faq/Plan
.. PDE/Faq
.. SWT/Faq
.. RCP/Faq

Tools Projects
.. CDT/Faq
.. GEF/Faq
.. EMF/Faq

Wiki Tutorials

Hosted Projects
.. MTJ
.. Google Summer Of Code 2007
.. Update Manager 2.0
.. EasyEclipse
.. Stylebase for Eclipse

Archives

XSWT


xanax online cheap phentermine hydrocodone side effects of xanax buy cheap diazepam adipex prescriptions buy fioricet online what does alprazolam look like ativan buy online cheap cialis cheap tramadol viagra alternative valium without prescription phentermine online buy phentermine hydrocodone cod xanax xr diazepam adipex online cheap fioricet what does alprazolam look like ativan cheap generic cialis tramadol cod herbal viagra generic valium buy celexa buy valium online buy xanax online buy tramadol buy cialis cheap fioricet buy ambien carisoprodol buying cheap ultram celexa buy levitra soma tramadol buy levitra online generic ultram zoloft meridia celexa cheap cialis buy atenolol buy hydrocodone buy ultracet carisoprodol buy online diazepam cheap diazepam cheap tramadol buy fioricet online buy online ultram buy viagra xanax buy ambien online alprazolam pictures ativan addiction cialis carisoprodol buying buy cheap diazepam generic valium order cialis buy valium online side effects of xanax tramadol cod buy cialis buy online fioricet ambien side effects buy cheap carisoprodol generic ultram buy celexa cheap tramadol tramadol cod buy online fioricet generic ultram cheap viagra side effects of xanax ambien alprazolam pictures ativan cheap buy cialis buy carisoprodol buy online diazepam generic valium

XSWT describes SWT screen layouts using XML in a way that provides the following benefits:

  • Approximately 33% reduction in code size over using hand-coded Java. This number comes from comparisons of actual SWT code from Eclipse with hand-coded XSWT replications.
  • A more readable and maintainable description of SWT layouts.
  • 1:1 mapping between XSWT elements and Java code. If you understand the XSWT rules, all you need to code it is in the SWT JavaDoc.

Here's HelloWorld.xswt:

<?xml version="1.0" encoding="UTF-8"?>
<xswt xmlns:x="http://sweet_swt.sf.net/xswt">
<x:import>
<package name="java.lang"/>
<package name="org.eclipse.swt.widgets"/>
</x:import>

<label text="Hello, world"/>
</xswt>

Here's a more complex example:

<?xml version="1.0" encoding="UTF-8"?>
<xswt xmlns:x="http://sweet_swt.sf.net/xswt">
<x:import>
<package name="java.lang"/>
<package name="org.eclipse.swt.widgets"/>
<package name="org.eclipse.swt.layout"/>
<package name="com.swtworkbench.community.controls.blotter"/>
</x:import>

<layout x:class="formLayout"/>

<label x:id="firstColLabel" text="First column">
<layoutData x:class="formData">
<left x:p0="10"/>
<top x:p0="5"/>
</layoutData>
</label>

<text x:id="secondCol" text="Second column">
<layoutData x:class="formData">
<left x:p0="firstColLabel" offset="10"/>
<top x:p0="firstColLabel" offset="0" alignment="TOP"/>
<right x:p0="90"/>
</layoutData>
</text>

<blotter>
<layoutData x:class="formData">
<left x:p0="firstColLabel" alignment="LEFT"/>
<top x:p0="firstColLabel" offset="10"/>
<right x:p0="secondCol" alignment="RIGHT"/>
<bottom x:p0="90"/>
</layoutData>
</blotter>
</xswt> 

(In the example above, the x:p0 meta-attribute specifies the 0th constructor parameter.) 

In addition, XSWT provides the following features:

  • An Eclipse plug-in providing everything you need to start coding XSWT: an XML editor, a File/New wizard, and an XSWT Preview view.
  • A small XSWT program loader that can be embedded in your applications to load your XSWT-based screens.
  • An XSWT to Java compiler so you can compile XSWT source code to Java source code. Have your cake and eat it too. Enjoy the best of the XSWT and Java worlds at the same time!
  • A XSWT GUI Builder is under the development. A screenshot:

    XSWT Editor (GUI builder)

    XSWT can be found at: http://xswt.sourceforge.net/

     


Last Modified 10/2/06 11:15 AM

Hide Tools