blob: 6aee0cc1c9d6a6c6325bef3bbc984043dbd2cd0b [file] [log] [blame]
<div>
<h2>Minimum Requirements</h2>
<h3>Move <em>org.eclipse.rap.jface.databinding</em> to Java 8</h3>
<p>
The underlying platform bundles <em>org.eclipse.core.databinding.*</em> now require Java 8. The
Bundle-RequiredExecutionEnvironment (BREE) of "org.eclipse.rap.jface.databinding" bundle has
been updated to <em>JavaSE-1.8</em>.
</p>
<h2>Application Development</h2>
<h3>New service interface ClientFileLoader</h3>
</p>
Custom widgets often require their own CSS file to be loaded on the client.
We already supported loading JavaScript files using the <code>JavaScriptLoader</code> service,
but we had no service to load CSS files.
</p>
<p>
So we've introduced a new service interface named <code>ClientFileLoader</code> that can load
both, JS and CSS files.
The service provides two methods, <code>requireJs</code> and <code>requireCss</code>, that both
accept a URL to load.
The ClientFileLoader ensures that every file is loaded only once per session, so you can safely
use it in the constructor of a custom widget.
</p>
<pre lang="java">
ClientFileLoader loader = RWT.getClient().getService( ClientFileLoader.class );
loader.requireJs( JS_URL );
loader.requireCss( CSS_URL );
</pre>
<p>
This new service replaces the existing <code>JavaScriptLoader</code> service, which has been
deprecated.
</p>
<h3>Use API extensions to replace RWT utility classes</h3>
<p>
In those rare cases where RAP requires a slightly different API than SWT, we used to
provide additional methods in utility classes like <code>BrowserUtil</code> and <code>DialogUtil</code>.
These utilities contain non-blocking versions of the SWT methods <code>Browser.evaluate()</code>
and <code>Dialog.open()</code>, that are needed for the JEE compatible mode.
We avoided making extensions to classes and interfaces from SWT.
</p>
<p>
Reconsidering this approach, we think that it makes the developer's life harder, as these
methods cannot be found directly, and the separation does not bring a real advantage.
So we decided to take the freedom to add those few extensions directly to the SWT classes.
For example, instead of:
</p>
<pre lang="java">
DialogUtil.open( dialog, returnCode -> {
if( returnCode == SWT.OK ) {
// do something
}
});
</pre>
<p>
you can now write:
</p>
<pre lang="java">
dialog.open( returnCode -> {
if( returnCode == SWT.OK ) {
// do something
}
});
</pre>
<p>
The non-blocking methods are now available on <code>Dialog</code> and <code>Browser</code>,
respectively.
<code>DialogUtil</code> and <code>BrowserUtil</code> have been deprecated.
</p>
<h2>Incubator Projects Migrated to RAP Core</h2>
<h3>Nebula RichTextEditor</h3>
<p>
The RichText widget has been graduated as Nebula RichTextEditor and moved from the
<a href="http://eclipse.org/rap/incubator/">RAP Incubator</a> to the RAP repository. It supports
a subset of the API from the RichTextEditor found in the
<a href="http://eclipse.org/nebula/">Nebula Release</a>.
</p>
<p>
The RichTextEditor is included in the RAP target platform and can be used simply by importing
the <em>org.eclipse.nebula.widgets.richtext</em> package.
</p>
<h2>Widget Set</h2>
<h3>Right-to-left support</h3>
<p>
In this release we added support for right-to-left orientation to all widgets. Like in SWT, the
coordinate system of an RTL Composite is mirrored horizontally (the [ 0, 0 ] point is on
top-right corner).
</p>
<p>
<img class="framed" alt="RTL Tree" src="./images/rtl-tree.png"/><br/>
</p>
<h3>Support for alpha in Color</h3>
<p>
Support for alpha in Color has been added to SWT in Mars. As RAP client supports RGBA natively,
we added the missing API:
<ul>
<li><code>RGBA</code> class</li>
<li>constructor <code>Color(Device, RGBA)</code></li>
<li>constructor <code>Color(Device, RGB, int)</code></li>
<li>constructor <code>Color(Device, int, int, int, int)</code></li>
<li><code>getAlpha()</code></li>
<li><code>getRGBA()</code></li>
</ul>
</p>
<h3>Add support for more image formats</h3>
<p>
The internal <code>org.eclipse.swt.internal.image</code> package has been updated to the latest
SWT sources, which provides support for more image formats like 256x256 px ICOs.
</p>
<h3>Transformation Support for Canvas</h3>
<p>
<i>GC</i> now implements the <i>setTransform</i> method.
</p>
<pre lang="java">
Transform transform = new Transform( display );
gc.setTransform( transform );
gc.setBackground( display.getSystemColor( SWT.COLOR_BLACK ) );
gc.fillRectangle( 0, 0, 100, 50 );
transform.rotate( 10 );
gc.setTransform( transform );
gc.setBackground( display.getSystemColor( SWT.COLOR_RED ) );
gc.fillRectangle( 0, 0, 100, 50 );
transform.rotate( 10 );
gc.setTransform( transform );
gc.setBackground( display.getSystemColor( SWT.COLOR_YELLOW ) );
gc.fillRectangle( 0, 0, 100, 50 );
</pre>
<p>
<img class="framed" alt="Graphics Transformation" src="./images/transformation.png"/><br/>
</p>
<h3>Column Span Support for Nebula Grid</h3>
<p>
<i>GridItem</i> now implements the <i>setColumnSpan</i> method. The Grid itself has been given
a more spreadsheet-like default look to better work with this new feature. It is now also
separately themeable (previously shared a theme with Tree).
</p>
<p>
<img class="framed" alt="Grid column spanning" src="./images/columnspan.png"/><br/>
</p>
<h3>Selection Theming update for all Table/List-based Widgets</h3>
<p>
<i>Tree</i>, <i>Table</i>, <i>Grid</i>, <i>List</i>, <i>Combo</i>, <i>CCombo</i> and
<i>DropDown</i> have a new default theming for selected items. Instead of a dark-blue gradient
a solid, semi-transparent light blue is used. This preserves the color of the text elements
(they are no longer set to white) and allows elements like cell backgrounds that are normally
hidden beneath the selection effect to shine through. It also works better with
the new Nebula Grid look. The business theme remains unchanged.
</p>
<h3>Badge support for CTabItem</h3>
<p>
The CTabItem widget now supports badges:
</p>
<img class="framed" alt="Badges on CTabItems" src="./images/ctabitem-badges.png"/>
<p>
Those badges can be set using a data key:
</p>
<pre lang="java">ctabItem.setData( RWT.BADGE, "7" );</pre>
<p>
The given string is displayed at the top-right of the item. To adjust the look of badges, the
<em>Widget-Badge</em> element can be used. It currently supports the properties <em>font</em>,
<em>color</em>, <em>background-color</em>, <em>border</em> and <em>border-radius</em>.
</p>
<h3>Partial redraw</h3>
<p>
The implementation of method <code>Control#redraw(int, int, int, int, boolean)</code> has been
improved. Now, only the provided rectangle is redrawn on the client without clearing rest of the
drawing area.
</p>
<h3>Support for native HTML document overflow behaviour</h3>
</p>
For better support of RAP applications that look like normal web sites, we added a possibility to
enable native HTML document overflow behaviour. To enable it, a new property
<code>WebClient.PAGE_OVERFLOW</code> with one of the values "scroll", "scrollX" or "scrollY"
must be set to your application.
</p>
<pre lang="java">
public class MyApplication implements ApplicationConfiguration {
@Override
public void configure( Application application ) {
Map<String, String> properties = new HashMap<String, String>();
...
properties.put( WebClient.PAGE_OVERFLOW, "scrollY" );
application.addEntryPoint( "/", MyEntryPoint.class, properties );
}
}
</pre>
</div>