Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Rap10M5 News"

(RWT)
Line 1: Line 1:
__NOTOC__
 
 
| [[RAP|RAP wiki home]] | [http://eclipse.org/rap RAP project home] |
 
| [[RAP|RAP wiki home]] | [http://eclipse.org/rap RAP project home] |
 
===RAP 1.0 M5 - New and Noteworthy===
 
===RAP 1.0 M5 - New and Noteworthy===
Line 17: Line 16:
 
The column order can be queried and changed programmatically using <code>getColumnOrder()</code> and <code>setColumnOrder()</code>. Marking a column with <code>setMoveable</code> permits the user to change its order by drag and drop.
 
The column order can be queried and changed programmatically using <code>getColumnOrder()</code> and <code>setColumnOrder()</code>. Marking a column with <code>setMoveable</code> permits the user to change its order by drag and drop.
  
If a table is created with the <code>SWT.VIRTUAL</code> flag, <code>TableItem</code>s are only realized client-side when they become visible. The code below shows how the <code>SetData</code> event can be used to populate a <code>VIRTUAL</code> table.
+
If a table is created with the <code>SWT.VIRTUAL</code> flag, <code>TableItem</code>s are only realized client-side when they become visible. Even though, in most situations, using the <code>[[#RAP _JFace|TableViewer]]</code> will be more convenient, the code below shows how the <code>SetData</code> event can be used to "manually" populate a <code>VIRTUAL</code> table.
 
<pre>
 
<pre>
 
Table table = new Table( shell, SWT.VIRTUAL );
 
Table table = new Table( shell, SWT.VIRTUAL );
Line 29: Line 28:
 
table.setItemCount( 300 );
 
table.setItemCount( 300 );
 
</pre>
 
</pre>
 +
|}
 +
 +
==RAP JFace==
 +
{|
 +
|-valign="top" align="left"
 +
|width="20%"|'''TableViewer'''
 +
|width="80%"|
 +
As the underlying RWT <code>Table</code> now understands the <code>VIRTUAL</code> flag, the relevant <code>TableViewer</code> code was activated as well.
 
|}
 
|}
  

Revision as of 14:18, 24 June 2007

| RAP wiki home | RAP project home |

RAP 1.0 M5 - New and Noteworthy

This document will become the New and Noteworthy page for the next milestone release and meanwhile serves to document the development progress.

All features documented here can be obtained from CVS HEAD.

RWT

New Table features

The Table widget now notifies about double-click events by sending a SelectionListener#widgetDefaultSelected.

The column order can be queried and changed programmatically using getColumnOrder() and setColumnOrder(). Marking a column with setMoveable permits the user to change its order by drag and drop.

If a table is created with the SWT.VIRTUAL flag, TableItems are only realized client-side when they become visible. Even though, in most situations, using the TableViewer will be more convenient, the code below shows how the SetData event can be used to "manually" populate a VIRTUAL table.

Table table = new Table( shell, SWT.VIRTUAL );
table.addListener( SWT.SetData, new Listener() {
  public void handleEvent( final Event event ) {
    TableItem item = ( TableItem )event.item;
    int index = table.indexOf( item );
    item.setText( "Item " + index  );
  }
} );
table.setItemCount( 300 );

RAP JFace

TableViewer

As the underlying RWT Table now understands the VIRTUAL flag, the relevant TableViewer code was activated as well.

RAP Workbench

DrillDownAdapter

Drilldown Adapters are a feature available for TreeViewers to help navigate through the data, instead of having to deal with ever expanding trees. In this way you can essentially zoom in to view just one part of the tree, i.e., drill down. Only two lines of code were added throughout the initialization of the viewer to invoke this feature in the context menu. Only one line was needed to add them to the view's toolbar. They are shown below:

// Create the Drill Down Adapter
drillDownAdapter = new DrillDownAdapter(viewer);

// Add the options to the view's toolbar (IToolBarManager)
drillDownAdapter.addNavigationActions(manager);

After adding them to the IToolbarManager of your view, they are looking like this:

RAPDrillDownAdapter.png


The above features are just the ones that are new since the previous milestone build. Summaries for earlier milestone builds:

New for RAP 1.0 milestone build M4 (June 08, 2007)
New for RAP 1.0 milestone build M3 (April 27, 2007)
New for RAP 1.0 milestone build M2 (March 2, 2007)

Back to the top