JFace-Snippets are small easy understandable programming example how to use JFace API. You can find them in CVS JFace code snippets:
Demonstrates tables with more than one column and the usage of ITableLabelProvider
Demonstrates how the selection can be hidden when the user click in a tablerow/column which doesn't hold any information. The standard behaviour of SWT-Table is to leave the selection on the last column. This snippet removes the selection if the user clicks in an area not selectable
Demonstrates how to create a different context menu depending on which item in the tree is currently selected this can also be used with a table of course
Demonstrates first use case for the new OwnerDraw-Support added to JFace in 3.3 (available at SWT-Level since 3.2). This example uses the new Viewers API in this special case the OwnerDrawLabelProvider to make items with more than one line of text.
Demonstrates how you can use a use inline editing in tables with multiple columns which requires to use SWT.FULL_SELECTION but hiding the selection from the user.
Demonstrates how you can scroll a TableViewer to the specific model element using TableViewer#reveal(Object)
Demonstrates minimal example when trying to add inline editing to tables to get familiar with the various classes needed (3.2 API)
Demonstrates usage of new OwnerDraw-Support feature provided by JFace in 3.3(available in SWT since 3.2). This example uses the new Viewers API in this special case the OwnerDrawLabelProvider.
===Snippet011CustomTooltips Demonstrates usage of new custom tooltip support in 3.3 used to provide a tooltip for each cell in TableViewer
Demonstrates usage of none mandatory LabelProviders in TableViewers to set colors and fonts with 3.2-API
Demonstrates usage of none mandatory LabelProviders in TreeViewers to set colors and font with 3.2-API
Demonstrates usage of new custom tooltip support in 3.3 used to provide a tooltip for each cell in a TreeViewer
Demonstrates hiding and showing of columns (animated)
Demonstrates adding/removing of columns in conjunction with inline editing which makes this a bit tougher than without it (using 3.2 API)
Demonstrates adding/removing of columns in conjunction with the inline editing but with the new JFace-API who makes this a much easier and less error prone
Demonstrates editor activation on double-click with the 3.2 API which makes this fairly complex
Demonstrates how to refresh and viewer without scrolling the selection into after the refresh with 3.2 API. In 3.3 a special refresh-API for TableViewers is added.
Demonstrates the base classes of 3.3 API
Demonstrates how one can use the new 3.3 API to add tab-editing support to your viewer