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 "JFaceSnippets"

 
(123 intermediate revisions by 10 users not shown)
Line 1: Line 1:
JFace-Snippets are small easy understandable programming example how to use JFace API.
+
{{Warning|This page has been migrated to to https://github.com/eclipse-platform/eclipse.platform.ui/blob/master/docs/JFaceSnippets.md.}}
  
To browse examples, navigate to [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets examples GIT repository].  
+
JFace-Snippets are small and easy understandable programming examples of how to use the JFace API. To browse the examples, navigate to the [https://github.com/eclipse-platform/eclipse.platform.ui/tree/master/examples/org.eclipse.jface.snippets examples GIT repository].  
 +
 
 +
; Copy Paste
 +
: The header section of each snippet is a link to the plain source. You can copy the source and paste it directly on the source folder or package in an eclipse project. The package and the class will be created automatically. <br> * [[JfaceSnippets/Instructions#Copy Paste|Click here for a visual explanation]].
 +
 
 +
 
 +
__TOC__
  
 
== Dialogs ==
 
== Dialogs ==
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/dialogs/Snippet012DialogWithImageButtons.java Snippet012DialogWithImageButtons] ===
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/dialogs/Snippet012DialogWithImageButtons.java Snippet012 - Dialog with Image Buttons] ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/dialogs/Snippet012DialogWithImageButtons.java Snippet012 - Dialog with Image Buttons]
  
Demonstrates usage of Icons in Buttons of Dialogs  
+
 
 +
Demonstrates usage of Icons in Buttons of Dialogs
 +
 
 +
[[Image:Snippet012DialogWithImageButtons.png]]
 +
 
 +
Drop these icons also in the same package
 +
 
 +
[[Image:filesave.png]] [[Image:cancel.png]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/dialogs/Snippet082ColorSelectDialog.java Snippet082 - Color Selector] ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/dialogs/Snippet082ColorSelectDialog.java Snippet082 - Color Selector]
 +
 
 +
 
 +
The JFace ColorSelector widget is a convenient composition of button and color selector dialog. The button displays a swatch of the selected color.
 +
 
 +
 
 +
[[Image:Snippet082ColorSelectDialog.gif|border|325px]]
 +
 
 +
== Notification ==
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/dialogs/Snippet081NotificationPopup.java Snippet081 - Notication API] ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/dialogs/Snippet081NotificationPopup.java Snippet081 - Notication API]
 +
 
 +
 
 +
Demonstrates usage of the non-blocking notification API
 +
 
 +
 
 +
[[Image:Snippet081_Shell1.gif|border]]
  
 
== Layout  ==
 
== Layout  ==
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/layout/Snippet013GridLayoutFactory.java Snippet013GridLayoutFactory]  ===
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/layout/Snippet013GridLayoutFactory.java Snippet013 - Grid Layout Factory]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/layout/Snippet013GridLayoutFactory.java Snippet013 - Grid Layout Factory]
  
Demonstrates usage of the GridLayoutFactory to make more readable
 
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/layout/Snippet016TableLayout.java Snippet016TableLayout]  ===
+
Demonstrates usage of the GridLayoutFactory to enhance readability
  
Demonstrates (dynamic)layout support for TableColumns available as of JFace 3.3
+
[[Image:Snippet013_Shell1.png]]
 +
[[Image:Snippet013_Shell2.png]]
 +
[[Image:Snippet013_Shell3.png]]
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/layout/Snippet027TreeLayout.java Snippet027TreeLayout]  ===
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/layout/Snippet016TableLayout.java Snippet016 - Table Layout]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/layout/Snippet016TableLayout.java Snippet016 - Table Layout]
  
Demonstrates (dynamic)layout support for TreeColumns available as of JFace 3.3  
+
 
 +
Demonstrates (dynamic)layout support for TableColumns available as of JFace 3.3
 +
 
 +
[[Image:Snippet016.png]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/layout/Snippet027TreeLayout.java Snippet027 - Tree Layout]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/layout/Snippet027TreeLayout.java Snippet027 - Tree Layout]
 +
 
 +
 
 +
Demonstrates (dynamic)layout support for TreeColumns available as of JFace 3.3
 +
 
 +
[[Image:Snippet027.png]]
  
 
== Viewers  ==
 
== Viewers  ==
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet001TableViewer.java Snippet001TableViewer]  ===
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet001TableViewer.java Snippet001 - Table Viewer]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet001TableViewer.java Snippet001 - Table Viewer]
 +
 
  
 
Demonstrates a simply TableViewer with one column. It holds all important classes used for all Table-like JFace-Viewers (''[http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/LabelProvider.html LabelProvider]'',''[http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/IStructuredContentProvider.html IStructuredContentProvider]'')  
 
Demonstrates a simply TableViewer with one column. It holds all important classes used for all Table-like JFace-Viewers (''[http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/LabelProvider.html LabelProvider]'',''[http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/IStructuredContentProvider.html IStructuredContentProvider]'')  
Line 31: Line 81:
 
[[Image:Snippet1.png]]  
 
[[Image:Snippet1.png]]  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet002TreeViewer.java Snippet002TreeViewer]  ===
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet002TreeViewer.java Snippet002 - Tree Viewer]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet002TreeViewer.java Snippet002 - Tree Viewer]
 +
 
  
 
Demonstrates a simply TreeViewer with one column. It describes all important classes used for all Tree-like JFace-Viewers (''[http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/LabelProvider.html LabelProvider]'',''[http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/ITreeContentProvider.html ITreeContentProvider]'')  
 
Demonstrates a simply TreeViewer with one column. It describes all important classes used for all Tree-like JFace-Viewers (''[http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/LabelProvider.html LabelProvider]'',''[http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/ITreeContentProvider.html ITreeContentProvider]'')  
Line 37: Line 89:
 
[[Image:Snippet2.png]]  
 
[[Image:Snippet2.png]]  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet003TableLabelProvider.java Snippet003TableLabelProvider]  ===
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet003TableLabelProvider.java Snippet003 - Table Label Provider]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet003TableLabelProvider.java Snippet003 - Table Label Provider]
 +
 
  
 
Demonstrates tables with more than one column and the usage of ''[http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/ITableLabelProvider.html ITableLabelProvider]''  
 
Demonstrates tables with more than one column and the usage of ''[http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/ITableLabelProvider.html ITableLabelProvider]''  
  
[[Image:Snippet3.png]]  
+
[[Image:Snippet003.png]]
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet004HideSelection.java Snippet004HideSelection]  ===
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet004HideSelection.java Snippet004 - Hide Selection]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet004HideSelection.java Snippet004 - Hide Selection]
  
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 the selection can be hidden when the user clicks in a table-row/column which doesn't hold any information. The standard behavior 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  
  
 
[[Image:Snippet004.png]]  
 
[[Image:Snippet004.png]]  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet005TreeCustomMenu.java Snippet005TreeCustomMenu]  ===
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet005TreeCustomMenu.java Snippet005 - Tree Custom Menu]  ===
 +
*  [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet005TreeCustomMenu.java Snippet005 - Tree Custom Menu]
 +
 
  
 
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 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  
Line 55: Line 113:
 
[[Image:Snippet005.png]]  
 
[[Image:Snippet005.png]]  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet006TableMultiLineCells.java Snippet006TableMultiLineCells]  ===
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet006TableMultiLineCells.java Snippet006 - Table Multi Line Cells]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet006TableMultiLineCells.java Snippet006 - Table Multi Line Cells]
  
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 first use case for the OwnerDraw-Support added to JFace in 3.3 (available at SWT-Level since 3.2). This example uses the Viewers API in this special case the ''OwnerDrawLabelProvider'' to make items with more than one line of text.  
  
 
[[Image:Snippet006.png]]  
 
[[Image:Snippet006.png]]  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet007FullSelection.java Snippet007FullSelection]  ===
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet007FullSelection.java Snippet007 - Full Selection]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet007FullSelection.java Snippet007 - Full Selection]
 +
 
  
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 use inline editing in tables with multiple columns that require to use SWT.FULL_SELECTION but hiding the selection from the user.  
  
 
[[Image:Snippet007.png]]  
 
[[Image:Snippet007.png]]  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet008RevealElement.java Snippet008RevealElement]  ===
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet008RevealElement.java Snippet008 - Reveal Element]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet008RevealElement.java Snippet008 - Reveal Element]
 +
 
  
 
Demonstrates how you can scroll a TableViewer to the specific model element using TableViewer#reveal(Object)  
 
Demonstrates how you can scroll a TableViewer to the specific model element using TableViewer#reveal(Object)  
Line 73: Line 137:
 
[[Image:Snippet008.png]]  
 
[[Image:Snippet008.png]]  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet009CellEditors.java Snippet009CellEditors]  ===
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet009CellEditors.java Snippet009 - Cell Editors]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet009CellEditors.java Snippet009 - Cell Editors] 
 +
 
  
 
Demonstrates minimal example when trying to add inline editing to tables to get familiar with the various classes needed (3.2 API)  
 
Demonstrates minimal example when trying to add inline editing to tables to get familiar with the various classes needed (3.2 API)  
Line 79: Line 145:
 
[[Image:Snippet009.png]]  
 
[[Image:Snippet009.png]]  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet010OwnerDraw.java Snippet010OwnerDraw]  ===
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet010OwnerDraw.java Snippet010 - Owner Draw]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet010OwnerDraw.java Snippet010 - Owner Draw]
  
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''.  
+
 
 +
Demonstrates usage of the OwnerDraw-Support feature provided by JFace in 3.3(available in SWT since 3.2). This example uses the Viewers API in this special case the ''OwnerDrawLabelProvider''.  
  
 
[[Image:Snippet010.png]]  
 
[[Image:Snippet010.png]]  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet011CustomTooltips.java Snippet011CustomTooltips]  ===
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet011CustomTooltips.java Snippet011 - Custom Tooltips]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet011CustomTooltips.java Snippet011 - Custom Tooltips]
 +
 
 +
 
 +
Demonstrates usage of custom tooltip support in 3.3 used to provide a tooltip for each cell in TableViewer
 +
 
 +
[[Image:Snippet011.png]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet013TableViewerNoMandatoryLabelProvider.java Snippet013 - Table Viewer No Mandatory Label Provider]]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet013TableViewerNoMandatoryLabelProvider.java Snippet013 - Table Viewer No Mandatory Label Provider]]
 +
 
  
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
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet013TableViewerNoMandatoryLabelProvider.java Snippet013TableViewerNoMandatoryLabelProvider] ===
+
[[file:jfacesnippet013.png]]
  
Demonstrates usage of none mandatory LabelProviders in TableViewers to set colors and fonts with 3.2-API
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet014TreeViewerNoMandatoryLabelProvider.java Snippet014 - Tree Viewer No Mandatory Label Provider]]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet014TreeViewerNoMandatoryLabelProvider.java Snippet014 - Tree Viewer No Mandatory Label Provider]]
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet014TreeViewerNoMandatoryLabelProvider.java Snippet014TreeViewerNoMandatoryLabelProvider]  ===
 
  
 
Demonstrates usage of none mandatory LabelProviders in TreeViewers to set colors and font with 3.2-API  
 
Demonstrates usage of none mandatory LabelProviders in TreeViewers to set colors and font with 3.2-API  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet015CustomTooltipsForTree.java Snippet015CustomTooltipsForTree] ===
+
[[Image:Snippet014TreeViewerNoMandatoryLabelProvider.png]]
  
Demonstrates usage of new custom tooltip support in 3.3 used to provide a tooltip for each cell in a TreeViewer
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet015CustomTooltipsForTree.java Snippet015 - Custom Tooltips For Tree]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet015CustomTooltipsForTree.java Snippet015 - Custom Tooltips For Tree]
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet017TableViewerHideShowColumns.java Snippet017TableViewerHideShowColumns]  ===
 
  
Demonstrates hiding and showing of columns (animated)
+
Demonstrates usage of custom tooltip support used to provide a tooltip for each cell in a TreeViewer
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet018TableViewerAddRemoveColumnsWithEditing.java Snippet018TableViewerAddRemoveColumnsWithEditing] ===
+
[[Image:Snippet015CustomTooltipsForTree.png]]
  
Demonstrates adding/removing of columns in conjunction with inline editing which makes this a bit tougher than without it (using 3.2 API)
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet017TableViewerHideShowColumns.java Snippet017 - Table Viewer Hide Show Columns]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet017TableViewerHideShowColumns.java Snippet017 - Table Viewer Hide Show Columns] 
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet019TableViewerAddRemoveColumnsWithEditingNewAPI.java Snippet019TableViewerAddRemoveColumnsWithEditingNewAPI]  ===
 
  
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 hiding and showing columns (animated)
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet021CellEditorsOnDoubleClick.java Snippet021CellEditorsOnDoubleClick] ===
+
[[Image:Snippet017TableViewerHideShowColumns.png]]
  
Demonstrates editor activation on double-click with the 3.2 API which makes this fairly complex
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet019TableViewerAddRemoveColumnsWithEditing.java Snippet019 - Table Viewer Add Remove Columns With Editing]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet019TableViewerAddRemoveColumnsWithEditing.java Snippet019 - Table Viewer Add Remove Columns With Editing]
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet022TableViewerRefreshNoScroll.java Snippet022TableViewerRefreshNoScroll]  ===
 
  
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 adding/removing of columns in conjunction with the inline editing with JFace-API  
 +
 
 +
[[Image:Snippet019TableViewerAddRemoveColumnsWithEditing.png]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet024TableViewerExploreNewAPI.java Snippet024 - Table Viewer Explore]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet024TableViewerExploreNewAPI.java Snippet024 - Table Viewer Explore]
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet024TableViewerExploreNewAPI.java Snippet024TableViewerExploreNewAPI]  ===
 
  
 
Demonstrates the base classes of 3.3 API  
 
Demonstrates the base classes of 3.3 API  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet025TabEditing.java Snippet025TabEditing]  ===
+
[[Image:Snippet024TableViewerExploreNewAPI.png]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet025TabEditing.java Snippet025 - Tab Editing]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet025TabEditing.java Snippet025 - Tab Editing]
 +
 
 +
 
 +
Demonstrates how one can use the 3.3 API to add tab-editing support to your viewer
 +
 
 +
[[Image:Snippet025TabEditing.png]]
 +
 
 +
Press Tab to jump from cell to cell
  
Demonstrates how one can use the new 3.3 API to add tab-editing support to your viewer
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet026TreeViewerTabEditing.java Snippet026 - Tree Viewer Tab Editing]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet026TreeViewerTabEditing.java Snippet026 - Tree Viewer Tab Editing]
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet026TreeViewerTabEditing.java Snippet026TreeViewerTabEditing]  ===
 
  
Demonstrates all fancy things one can do with new 3.3 API (Tab-Editing, Keyboard-Navigation from Cell to Cell, Editor-Activation with the Keyboard)  
+
Demonstrates all fancy things one can do with the 3.3 API (Tab-Editing, Keyboard-Navigation from Cell to Cell, Editor-Activation with the Keyboard)  
  
 
[[Image:Snippet026TreeViewerTabEditing.gif]]  
 
[[Image:Snippet026TreeViewerTabEditing.gif]]  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet027ComboBoxCellEditors.java Snippet027ComboBoxCellEditors]  ===
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet027ComboBoxCellEditors.java Snippet027 - Combo Box Cell Editors]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet027ComboBoxCellEditors.java Snippet027 - Combo Box Cell Editors]
 +
 
  
 
Demonstrates usage of the ComboBoxCellEditor in JFace-Viewers  
 
Demonstrates usage of the ComboBoxCellEditor in JFace-Viewers  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet029VirtualTableViewer.java Snippet029VirtualTableViewer] ===
+
[[Image:Snippet027ComboBoxCellEditors.png]]
  
Demonstrates usage of JFace-Viewers in virtual mode with an ordinary content provider (often the bottel neck is not the model but the UI). Using this Virtual viewers in conjunction with an ordinary content provider has the advantage that Sorting and Filtering is supported in 3.3.  
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet029VirtualTableViewer.java Snippet029 - Virtual Table Viewer]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet029VirtualTableViewer.java Snippet029 - Virtual Table Viewer]
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet030VirtualLazyTableViewer.java Snippet030VirtualLazyTableViewer]  ===
 
  
Demonstrates usage of JFace-Viewer virtual mode with a lazy content provider  
+
Demonstrates usage of JFace-Viewers in "virtual" mode with an ordinary content provider (often the bottleneck is not the model but the UI). Using these Virtual viewers in conjunction with an ordinary content provider has the advantage that Sorting and Filtering are supported in 3.3.
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet030VirtualLazyTableViewer.java Snippet030 - Virtual Lazy Table Viewer]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet030VirtualLazyTableViewer.java Snippet030 - Virtual Lazy Table Viewer]
 +
 
 +
 
 +
Demonstrates usage of JFace-Viewer virtual mode with a lazy content provider
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet031TableViewerCustomTooltipsMultiSelection.java Snippet031 - Table Viewer Custom Tooltips Multi Selection]]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet031TableViewerCustomTooltipsMultiSelection.java Snippet031 - Table Viewer Custom Tooltips Multi Selection]]
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet031TableViewerCustomTooltipsMultiSelection.java Snippet031TableViewerCustomTooltipsMultiSelection]  ===
 
  
 
Demonstrates creation of tooltips for cells for pre 3.3 users  
 
Demonstrates creation of tooltips for cells for pre 3.3 users  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet034CellEditorPerRow.java Snippet034CellEditorPerRowNewAPI]  ===
+
[[Image:Snippet031TableViewerCustomTooltipsMultiSelection.png]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet034CellEditorPerRow.java Snippet034 - Cell Editor Per Row]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet034CellEditorPerRow.java Snippet034 - Cell Editor Per Row]
 +
 
  
 
Demonstrates different CellEditor-Types in one COLUMN of JFace-Viewers  
 
Demonstrates different CellEditor-Types in one COLUMN of JFace-Viewers  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet035TableCursorCellHighlighter.java Snippet035TableCursorCellHighlighter]  ===
+
[[Image:Snippet034CellEditorPerRow.png]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet035TableCursorCellHighlighter.java Snippet035 - Table Cursor Cell Highlighter]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet035TableCursorCellHighlighter.java Snippet035 - Table Cursor Cell Highlighter]
 +
 
 +
 
 +
Demonstrates keyboard navigation in TableViewers using a TableCursor showing the flexibility of the cell navigation support
 +
 
 +
You also need these classes:
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/CursorCellHighlighter.java CursorCellHighlighter.java]
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/AbstractCellCursor.java AbstractCellCursor.java]
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/TableCursor.java TableCursor.java]
 +
 
 +
 
 +
[[Image:Snippet035TableCursorCellHighlighter.png]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet036FocusBorderCellHighlighter.java Snippet036 - Focus Border Cell Highlighter]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet036FocusBorderCellHighlighter.java Snippet036 - Focus Border Cell Highlighter]
 +
 
 +
 
 +
Demonstrates keyboard navigation by highlighting the currently selected cell with a focus border showing once more the flexibility of the cell navigation support
 +
 
 +
You also need:
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/FocusBorderCellHighlighter.java FocusBorderCellHighlighter.java]
  
Demonstrates keyboard navigation in TableViewers using a TableCursor showing the flexibility of the new cell navigation support
 
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet036FocusBorderCellHighlighter.java Snippet036FocusBorderCellHighlighter] ===
+
[[Image:Snippet036FocusBorderCellHighlighter.png]]
  
Demonstrates keyboard navigation by highlighting the currently selected cell with a focus border showing once more the flexibility of the new cell navigation support
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet037FancyCustomTooltips.java Snippet037 - Fancy Custom Tooltips]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet037FancyCustomTooltips.java Snippet037 - Fancy Custom Tooltips]
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet037FancyCustomTooltips.java Snippet037FancyCustomTooltips]  ===
 
  
 
Demonstrates customizability of the 3.3 JFace-Support for cell tooltips using the Browser-Widget and presenting HTML  
 
Demonstrates customizability of the 3.3 JFace-Support for cell tooltips using the Browser-Widget and presenting HTML  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet038TreeViewerInlinelEditingOldAPI.java Snippet038TreeViewerInlinelEditingOldAPI] ===
+
[[Image:Snippet037FancyCustomTooltips.png]]
  
Demonstrates editing support as of 3.2 for TreeViewers
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet039ListViewer.java Snippet039 - List Viewer]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet039ListViewer.java Snippet039 - List Viewer]
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet039ListViewer.java Snippet039ListViewer]  ===
 
  
 
Demonstrates a very simple usage of ListViewer  
 
Demonstrates a very simple usage of ListViewer  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet040TableViewerSorting.java Snippet040TableViewerSorting] ===
+
[[Image:Snippet039ListViewer.png]]
  
Demonstrates sorting(asc/desc) in TableViewers by clicking the column header. This snippet uses classes from JFace 3.3 but can be easily adopted to work with JFace from 3.2
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet040TableViewerSorting.java Snippet040 - Table Viewer Sorting]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet040TableViewerSorting.java Snippet040 - Table Viewer Sorting]
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet041TableViewerAlternatingColors.java Snippet041TableViewerAlternatingColors]  ===
 
  
Demonstrates how to achieve alternating row-colors with TableViewer and the new JFace 3.3 API which allows for faster algorithms and can be used in conjunction with virtual-bits to even work with big tables (e.g. 100,000 rows in this example).  
+
Demonstrates sorting (ascending/descending) in TableViewers by clicking the column header.  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet042ToolTipSupportFor32API.java Snippet042ToolTipSupportFor32API] ===
+
[[Image:Snippet040TableViewerSorting.png]]
  
Because ColumnViewerToolTipSupport forces one to use the new 3.3 CellLabelProvider-API it is of no use for people stuck with the old LabelProvider API. This snippet shows how a potential class for 3.2 API could look like.  
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet041TableViewerAlternatingColors.java Snippet 041 - Table Viewer Alternating Colors and Viewer Filters]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet041TableViewerAlternatingColors.java Snippet 041 - Table Viewer Alternating Colors and Viewer Filters] 
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet043NoColumnTreeViewerKeyboardEditing.java Snippet043NoColumnTreeViewerKeyboardEditing]  ===
 
  
Demonstrates the JFace 3.3 keyboard editing support for Trees without columns. Tabbing from editor to editor is supported since 3.4.  
+
Demonstrates how to achieve alternating row-colors with TableViewer. It can also be used in conjunction with virtual-bits to even work with big tables (e.g. 100,000 rows in this example). In addition, this snippet provided a button that will demonstrate the usage of viewer filters.
 +
 
 +
[[Image:Snippet041TableViewerAlternatingColors.png]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet043TreeViewerKeyboardEditing.java Snippet043 - Tree Viewer Keyboard Editing]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet043TreeViewerKeyboardEditing.java Snippet043 - Tree Viewer Keyboard Editing]
 +
 
 +
 
 +
Demonstrates the JFace 3.3 keyboard editing support for Trees without columns. Tabbing from editor to editor is supported since 3.4. In addition, this snippet provided a button that shows how to enter in edit mode programmatically.
 +
 
 +
[[Image:Snippet043TreeViewerKeyboardEditing.png]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet044TableViewerKeyboardEditing.java Snippet044 - Table Viewer Keyboard Editing]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet044TableViewerKeyboardEditing.java Snippet044 - Table Viewer Keyboard Editing]
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet044NoColumnTableViewerKeyboardEditing.java Snippet044NoColumnTableViewerKeyboardEditing]  ===
 
  
 
Demonstrates the JFace 3.3 keyboard editing support for Tables without columns. Tabbing from editor to editor is supported since 3.4.  
 
Demonstrates the JFace 3.3 keyboard editing support for Tables without columns. Tabbing from editor to editor is supported since 3.4.  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet045TableViewerFillFromBackgroundThread.java Snippet045TableViewerFillFromBackgroundThread] ===
+
You also need:
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/FocusBorderCellHighlighter.java FocusBorderCellHighlighter.java]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet045TableViewerFillFromBackgroundThread.java Snippet045 - Table Viewer Fill From Background Thread] ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet045TableViewerFillFromBackgroundThread.java Snippet045 - Table Viewer Fill From Background Thread]
 +
 
  
 
Demonstrates how a TableViewer with a sorter can be filled from a NON-UI thread  
 
Demonstrates how a TableViewer with a sorter can be filled from a NON-UI thread  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet046UpdateViewerFromBackgroundThread.java Snippet046UpdateViewerFromBackgroundThread]  ===
+
[[Image:Snippet045TableViewerFillFromBackgroundThread.gif]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet046UpdateViewerFromBackgroundThread.java Snippet046 - Update Viewer From Background Thread]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet046UpdateViewerFromBackgroundThread.java Snippet046 - Update Viewer From Background Thread]
 +
 
 +
 
 +
Demonstrates how to update a viewer from a long-running task (which is executed in a thread) and calls back to the UI-Thread using "asyncExec".
 +
 
 +
[[Image:Snippet046UpdateViewerFromBackgroundThread.gif]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet047VirtualLazyTreeViewer.java Snippet047 - Virtual Lazy Tree Viewer]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet047VirtualLazyTreeViewer.java Snippet047 - Virtual Lazy Tree Viewer]
 +
 
  
Demonstrates how to update a viewer from a long running task (which is executed in a thread) and calls back to the UI-Thread using asyncExec
+
Demonstrates the usage of ILazyContentProvider in conjunction with a Virtual-TreeViewer. The snippet shows how using a lazy tree can minimize the memory footprint and maximize the speed when viewing large models.
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet047VirtualLazyTreeViewer.java Snippet047VirtualLazyTreeViewer] ===
+
[[Image:Snippet047VirtualLazyTreeViewer.png]]
  
Demonstrates the usage of ILazyContentProvider in conjunction with a Virtual-TreeViewer
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet048TreeViewerTabWithCheckboxFor3_3.java Snippet048 - Tree Viewer Tab With Checkbox]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet048TreeViewerTabWithCheckboxFor3_3.java Snippet048 - Tree Viewer Tab With Checkbox]
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet048TreeViewerTabWithCheckboxFor3_3.java Snippet048TreeViewerTabWithCheckboxFor3_3]  ===
 
  
 
Demonstrates how to overcome a limitation when it comes to key-navigation and CheckBoxEditors in 3.3.1.  
 
Demonstrates how to overcome a limitation when it comes to key-navigation and CheckBoxEditors in 3.3.1.  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet049StyledCellLabelProvider.java Snippet049StyledCellLabelProvider] ===
+
This is a workaround for bug [https://bugs.eclipse.org/bugs/show_bug.cgi?id=198502 https://bugs.eclipse.org/bugs/show_bug.cgi?id=198502]
  
Demonstrates a new LabelProvider-Type which uses StyleRanges. This Snippet requires SWT/JFace 3.4.  
+
[[Image:Snippet048TreeViewerTabWithCheckboxFor3_3.png]]
  
[[Image:Snippet050DelegatingStyledCellLabelProvider.gif]]  
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet049StyledCellLabelProvider.java Snippet049 - Styled Cell Label Provider]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet049StyledCellLabelProvider.java Snippet049 - Styled Cell Label Provider]
 +
 
 +
 
 +
Demonstrates a LabelProvider-Type which uses StyleRanges. This Snippet requires SWT/JFace 3.4.
 +
 
 +
[[Image:Snippet049StyledCellLabelProvider.gif]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet050DelegatingStyledCellLabelProvider.java Snippet050 - Delegating Styled Cell Label Provider]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet050DelegatingStyledCellLabelProvider.java Snippet050 - Delegating Styled Cell Label Provider]  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet050DelegatingStyledCellLabelProvider.java Snippet050DelegatingStyledCellLabelProvider]  ===
 
  
 
Demonstrates how you can add styled text by wrapping an existing label provider. This Snippet requires SWT/JFace 3.4.  
 
Demonstrates how you can add styled text by wrapping an existing label provider. This Snippet requires SWT/JFace 3.4.  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet051TableCenteredImage.java Snippet051TableCenteredImage]  ===
+
[[Image:Snippet050DelegatingStyledCellLabelProvider.png]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet051TableCenteredImage.java Snippet051 - Table Centered Image]  ===
 +
*  [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet051TableCenteredImage.java Snippet051 - Table Centered Image]
 +
 
 +
 
 +
Demonstrate how to center an image and create graphics in a cell using a technique called "owner draw".
 +
 
 +
[[Image:Snippet051TableCenteredImage.png]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet052DoubleClickCellEditor.java Snippet052 - Double Click Cell Editor]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet052DoubleClickCellEditor.java Snippet052 - Double Click Cell Editor]
 +
 
 +
 
 +
Demonstrate how to start cell-editors on double click.
 +
 
 +
[[Image:Snippet052DoubleClickCellEditor.png]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet053StartEditorWithContextMenu.java Snippet053 - Start Editor With Context Menu]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet053StartEditorWithContextMenu.java Snippet053 - Start Editor With Context Menu]
 +
 
  
Demonstrate how to center an image using owner draw. This snippet requires SWT/JFace 3.3.  
+
Demonstrate how to start up a cell editor with a context menu and not with mouse clicking on the cell.  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet052DouleClickCellEditor.java Snippet052DouleClickCellEditor] ===
+
[[Image:Snippet053StartEditorWithContextMenu.png]]
  
Demonstrate how to start cell-editors on double click. This snippet requires SWT/JFace 3.3
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet055HideShowColumn.java Snippet055 - Hide Show Column]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet055HideShowColumn.java Snippet055 - Hide Show Column]
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet053StartEditorWithContextMenu.java Snippet053StartEditorWithContextMenu]  ===
 
  
Demonstrate how to start up an editor with a context menu and not with mouse clicking on the cell.  
+
Demonstrate hiding and showing columns and starting a cell editor programmatically.
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet055HideShowColumn.java Snippet055HideShowColumn] ===
+
[[Image:Snippet055HideShowColumn.png]]
  
Demonstrate hiding and showing columns
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet056BooleanCellEditor.java Snippet056 - Boolean Cell Editor]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet056BooleanCellEditor.java Snippet056 - Boolean Cell Editor]
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet056BooleanCellEditor.java Snippet056BooleanCellEditor]  ===
 
  
 
Demonstrate a custom cell-editor which uses a real Checkbox-Button  
 
Demonstrate a custom cell-editor which uses a real Checkbox-Button  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet057TableViewerSkipHiddenCells.java Snippet057TableViewerSkipHiddenCells] ===
+
You also need these classes:
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/BooleanCellEditor.java BooleanCellEditor.java]  
  
Example of showing how easy cell-navigation with hidden cells is in 3.4
 
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet058CellNavigationIn34.java Snippet058CellNavigationIn34] ===
+
[[Image:Snippet056BooleanCellEditor.png]]
  
Example for full feature cell navigation until bug 230955 is fixed
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet057TableViewerSkipHiddenCells.java Snippet057 - Table Viewer Skip Hidden Cells]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet057TableViewerSkipHiddenCells.java Snippet057 - Table Viewer Skip Hidden Cells]
  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet060TextCellEditorWithContentProposal.java Snippet060TextCellEditorWithContentProposal]  ===
+
Example of showing how easy cell-navigation with hidden cells is. Use the cursor keys to navigate between cells. Then use the context menu to hide a column.
 +
 
 +
[[Image:Snippet057TableViewerSkipHiddenCells.png]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet058CellNavigationIn34.java Snippet058 - Cell Navigation]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet058CellNavigationIn34.java Snippet058 - Cell Navigation]
 +
 
 +
 
 +
Shows how to automatically reveal cells when navigating. Run the snippet and then edit the first cell by double-clicking. Pressing the tab key will advance to the next cell in edit mode and reveal the cell if it is not in the viewport.
 +
 
 +
[[Image:Snippet058CellNavigationIn34.gif]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet060TextCellEditorWithContentProposal.java Snippet060 - Text Cell Editor With Content Proposal/Field assists]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet060TextCellEditorWithContentProposal.java Snippet060 - Text Cell Editor With Content Proposal/Field assists]
 +
 
  
 
Show how to use content-proposal inside a CellEditor  
 
Show how to use content-proposal inside a CellEditor  
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet061FakedNativeCellEditor.java Snippet061FakedNativeCellEditor] ===
+
[[Image:Snippet060TextCellEditorWithContentProposal.png]]
  
Full featured native looking viewer with checkboxes in an arbitary column  
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet061FakedNativeCellEditor.java Snippet061 - Faked Native Cell Editor]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet061FakedNativeCellEditor.java Snippet061 - Faked Native Cell Editor]
 +
 
 +
 
 +
Full-featured native-looking viewer with checkboxes in an arbitrary column  
 +
 
 +
You also need these classes:
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/BooleanCellEditor.java BooleanCellEditor.java]
 +
 
 +
 
 +
 
 +
[[Image:Snippet061FakedNativeCellEditor.png]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet062TextAndDialogCellEditor.java Snippet062 - Text And Dialog Cell Editor] ===
 +
*  [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet062TextAndDialogCellEditor.java Snippet062 - Text And Dialog Cell Editor]
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet62TextAndDialogCellEditor.java Snippet062TextAndDialogCellEditor] ===
 
  
 
Demonstrates usage of TextAndDialogCellEditor. The email column uses the TextAndDialogCellEditor; othe columns use ordinary TextCellEditor.
 
Demonstrates usage of TextAndDialogCellEditor. The email column uses the TextAndDialogCellEditor; othe columns use ordinary TextCellEditor.
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet063ComboViewer.java Snippet063ComboViewer] ===
+
You also need these classes:
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/TextAndDialogCellEditor.java TextAndDialogCellEditor.java]  
  
Show how to use ComboViewer and set a inital selection
+
 
 +
[[Image:Snippet062TextAndDialogCellEditor.png]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet063ComboViewer.java Snippet063 - Combo Viewer] ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet063ComboViewer.java Snippet063 - Combo Viewer]
 +
 
 +
 
 +
Show how to use ComboViewer and set an initial selection
 +
 
 +
[[Image:Snippet063ComboViewer.png]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet064TreeViewerReplacingElements.java Snippet064 - Replacing elements in a TreeViewer with child elements] ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet064TreeViewerReplacingElements.java Snippet064 - Replacing elements in a TreeViewer with child elements]
 +
 
 +
 
 +
A TreeViewer with observable collections as input, to demonstrate, how elements are replaced, especially what happens to selected items on replacement
 +
 
 +
[[Image:Snippet064TreeViewerReplacingElements.png]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet065TableViewerReplacingElements.java Snippet065 - Replacing elements in a TreeViewer without child elements] ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet065TableViewerReplacingElements.java Snippet065 - Replacing elements in a TreeViewer without child elements]
 +
 
 +
 
 +
A TreeViewer with observable collections as input, to demonstrate, how elements are replaced, especially what happens to selected items on replacement
 +
 
 +
[[Image:Snippet065TableViewerReplacingElements.png]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet066TableViewerWithLabelDecorator.java Snippet066 - TableViewer with Label Decorator] ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet066TableViewerWithLabelDecorator.java Snippet066 - TableViewer with Label Decorator]
 +
 
 +
 
 +
A TableViewer that shows how to add a status icon to a Label with IStyledLabelProvider and DecorationOverlayIcon
 +
 
 +
[[Image:Snippet066TableViewerWithLabelDecorator.png]]
  
 
== Window  ==
 
== Window  ==
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/window/Snippet020CustomizedControlTooltips.java Snippet020CustomizedControlTooltips]  ===
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/window/Snippet020CustomizedControlTooltips.java Snippet020 - Customized Control Tooltips]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/window/Snippet020CustomizedControlTooltips.java Snippet020 - Customized Control Tooltips]
  
Demonstrates usage of new JFace 3.3 to show really cool ToolTips for your controls
 
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/window/Snippet023TreeViewerCustomTooltips.java Snippet023TreeViewerCustomTooltips]  ===
+
Demonstrates usage of JFace 3.3 to show really cool ToolTips for your controls
  
Demonstrates creation of ToolTips for users pre 3.3.  
+
For full fun you also need:
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/window/linkto_help.gif Help Icon]
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/window/showerr_tsk.gif Error Icon]
 +
 
 +
 
 +
[[Image:Snippet020CustomizedControlTooltips.png]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/window/Snippet031TableStaticTooltip.java Snippet031 - Table Static Tooltip]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/window/Snippet031TableStaticTooltip.java Snippet031 - Table Static Tooltip]
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/window/Snippet031TableStaticTooltip.java Snippet031TableStaticTooltip]  ===
 
  
 
Demonstrates creation of ToolTips for Tables without using the JFace-Viewers API but only JFace-Tooltips
 
Demonstrates creation of ToolTips for Tables without using the JFace-Viewers API but only JFace-Tooltips
 +
 +
[[Image:Snippet031TableStaticTooltip.png]]
  
 
== Wizard ==
 
== Wizard ==
  
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/wizard/Snippet047WizardWithLongRunningOperation.java Snippet047WizardWithLongRunningOperation]  ===
+
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/wizard/Snippet047WizardWithLongRunningOperation.java Snippet047 - Wizard with Long Running Operation from Page]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/wizard/Snippet047WizardWithLongRunningOperation.java Snippet047 - Wizard with Long Running Operation from Page]
 +
 
 +
 
 +
Demonstrates how to work with JFace-Wizards and fill a TableViewer from a Background-Thread without blocking the UI showing a progress bar in the meanwhile
 +
 
 +
[[Image:Snippet047.gif]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/wizard/Snippet071WizardWithProgressAndCancel.java Snippet071 - Wizard with Progress and Cancel] ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/wizard/Snippet071WizardWithProgressAndCancel.java Snippet071 - Wizard with Progress and Cancel]
 +
 
 +
 
 +
Demonstrates a wizard with internal progress.
 +
 
 +
[[Image:Snippet071WizardWithProgressAndCancel.gif]]
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/wizard/Snippet072WizardWithProgressSubtasksAndCancel.java Snippet072 Wizard with Progress Subtasks and Cancel]  ===
 +
*  [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/wizard/Snippet072WizardWithProgressSubtasksAndCancel.java Snippet072 Wizard with Progress Subtasks and Cancel]
 +
 
 +
[https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/FocusBorderCellHighlighter.java Demonstrates a wizard with internal progress using SubMonitor and subtasks.]
 +
 
 +
[[Image:Snippet072WizardWithProgressSubtasksAndCancel.png]]
 +
 
 +
 
 +
=== [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/wizard/Snippet074ModelesWizard.java Snippet074 Wizard with access to application window]  ===
 +
* [https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/wizard/Snippet074ModelesWizard.java Snippet074 Wizard with access to application window]
 +
 
 +
 
 +
Demonstrates a wizard that enables access to the calling shell...
  
Demonstrates how to work with JFace-Wizards and fill a TableViewer from a Background-Thread without blocking the UI showing a progress bar in the meanwhile
+
[[Image:Snippet074ModelesWizard.gif]]
  
 
[[Category:Snippets]] [[Category:RCP]] [[Category:Platform_UI]]
 
[[Category:Snippets]] [[Category:RCP]] [[Category:Platform_UI]]

Latest revision as of 13:52, 8 January 2024


JFace-Snippets are small and easy understandable programming examples of how to use the JFace API. To browse the examples, navigate to the examples GIT repository.

Copy Paste
The header section of each snippet is a link to the plain source. You can copy the source and paste it directly on the source folder or package in an eclipse project. The package and the class will be created automatically.
* Click here for a visual explanation.


Contents

Dialogs

Snippet012 - Dialog with Image Buttons


Demonstrates usage of Icons in Buttons of Dialogs

Snippet012DialogWithImageButtons.png

Drop these icons also in the same package

Filesave.png Cancel.png

Snippet082 - Color Selector


The JFace ColorSelector widget is a convenient composition of button and color selector dialog. The button displays a swatch of the selected color.


Snippet082ColorSelectDialog.gif

Notification

Snippet081 - Notication API


Demonstrates usage of the non-blocking notification API


Snippet081 Shell1.gif

Layout

Snippet013 - Grid Layout Factory


Demonstrates usage of the GridLayoutFactory to enhance readability

Snippet013 Shell1.png Snippet013 Shell2.png Snippet013 Shell3.png

Snippet016 - Table Layout


Demonstrates (dynamic)layout support for TableColumns available as of JFace 3.3

Snippet016.png

Snippet027 - Tree Layout


Demonstrates (dynamic)layout support for TreeColumns available as of JFace 3.3

Snippet027.png

Viewers

Snippet001 - Table Viewer


Demonstrates a simply TableViewer with one column. It holds all important classes used for all Table-like JFace-Viewers (LabelProvider,IStructuredContentProvider)

Snippet1.png

Snippet002 - Tree Viewer


Demonstrates a simply TreeViewer with one column. It describes all important classes used for all Tree-like JFace-Viewers (LabelProvider,ITreeContentProvider)

Snippet2.png

Snippet003 - Table Label Provider


Demonstrates tables with more than one column and the usage of ITableLabelProvider

Snippet003.png

Snippet004 - Hide Selection


Demonstrates how the selection can be hidden when the user clicks in a table-row/column which doesn't hold any information. The standard behavior 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

Snippet004.png

Snippet005 - Tree Custom Menu


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

Snippet005.png

Snippet006 - Table Multi Line Cells


Demonstrates first use case for the OwnerDraw-Support added to JFace in 3.3 (available at SWT-Level since 3.2). This example uses the Viewers API in this special case the OwnerDrawLabelProvider to make items with more than one line of text.

Snippet006.png

Snippet007 - Full Selection


Demonstrates how you can use inline editing in tables with multiple columns that require to use SWT.FULL_SELECTION but hiding the selection from the user.

Snippet007.png

Snippet008 - Reveal Element


Demonstrates how you can scroll a TableViewer to the specific model element using TableViewer#reveal(Object)

Snippet008.png

Snippet009 - Cell Editors


Demonstrates minimal example when trying to add inline editing to tables to get familiar with the various classes needed (3.2 API)

Snippet009.png

Snippet010 - Owner Draw


Demonstrates usage of the OwnerDraw-Support feature provided by JFace in 3.3(available in SWT since 3.2). This example uses the Viewers API in this special case the OwnerDrawLabelProvider.

Snippet010.png

Snippet011 - Custom Tooltips


Demonstrates usage of custom tooltip support in 3.3 used to provide a tooltip for each cell in TableViewer

Snippet011.png

Snippet013 - Table Viewer No Mandatory Label Provider]


Demonstrates usage of none mandatory LabelProviders in TableViewers to set colors and fonts with 3.2-API

Jfacesnippet013.png

Snippet014 - Tree Viewer No Mandatory Label Provider]


Demonstrates usage of none mandatory LabelProviders in TreeViewers to set colors and font with 3.2-API

Snippet014TreeViewerNoMandatoryLabelProvider.png

Snippet015 - Custom Tooltips For Tree


Demonstrates usage of custom tooltip support used to provide a tooltip for each cell in a TreeViewer

Snippet015CustomTooltipsForTree.png

Snippet017 - Table Viewer Hide Show Columns


Demonstrates hiding and showing columns (animated)

Snippet017TableViewerHideShowColumns.png

Snippet019 - Table Viewer Add Remove Columns With Editing


Demonstrates adding/removing of columns in conjunction with the inline editing with JFace-API

Snippet019TableViewerAddRemoveColumnsWithEditing.png

Snippet024 - Table Viewer Explore


Demonstrates the base classes of 3.3 API

Snippet024TableViewerExploreNewAPI.png

Snippet025 - Tab Editing


Demonstrates how one can use the 3.3 API to add tab-editing support to your viewer

Snippet025TabEditing.png

Press Tab to jump from cell to cell

Snippet026 - Tree Viewer Tab Editing


Demonstrates all fancy things one can do with the 3.3 API (Tab-Editing, Keyboard-Navigation from Cell to Cell, Editor-Activation with the Keyboard)

Snippet026TreeViewerTabEditing.gif

Snippet027 - Combo Box Cell Editors


Demonstrates usage of the ComboBoxCellEditor in JFace-Viewers

Snippet027ComboBoxCellEditors.png

Snippet029 - Virtual Table Viewer


Demonstrates usage of JFace-Viewers in "virtual" mode with an ordinary content provider (often the bottleneck is not the model but the UI). Using these Virtual viewers in conjunction with an ordinary content provider has the advantage that Sorting and Filtering are supported in 3.3.

Snippet030 - Virtual Lazy Table Viewer


Demonstrates usage of JFace-Viewer virtual mode with a lazy content provider

Snippet031 - Table Viewer Custom Tooltips Multi Selection]


Demonstrates creation of tooltips for cells for pre 3.3 users

Snippet031TableViewerCustomTooltipsMultiSelection.png

Snippet034 - Cell Editor Per Row


Demonstrates different CellEditor-Types in one COLUMN of JFace-Viewers

Snippet034CellEditorPerRow.png

Snippet035 - Table Cursor Cell Highlighter


Demonstrates keyboard navigation in TableViewers using a TableCursor showing the flexibility of the cell navigation support

You also need these classes:


Snippet035TableCursorCellHighlighter.png

Snippet036 - Focus Border Cell Highlighter


Demonstrates keyboard navigation by highlighting the currently selected cell with a focus border showing once more the flexibility of the cell navigation support

You also need:


Snippet036FocusBorderCellHighlighter.png

Snippet037 - Fancy Custom Tooltips


Demonstrates customizability of the 3.3 JFace-Support for cell tooltips using the Browser-Widget and presenting HTML

Snippet037FancyCustomTooltips.png

Snippet039 - List Viewer


Demonstrates a very simple usage of ListViewer

Snippet039ListViewer.png

Snippet040 - Table Viewer Sorting


Demonstrates sorting (ascending/descending) in TableViewers by clicking the column header.

Snippet040TableViewerSorting.png

Snippet 041 - Table Viewer Alternating Colors and Viewer Filters


Demonstrates how to achieve alternating row-colors with TableViewer. It can also be used in conjunction with virtual-bits to even work with big tables (e.g. 100,000 rows in this example). In addition, this snippet provided a button that will demonstrate the usage of viewer filters.

Snippet041TableViewerAlternatingColors.png

Snippet043 - Tree Viewer Keyboard Editing


Demonstrates the JFace 3.3 keyboard editing support for Trees without columns. Tabbing from editor to editor is supported since 3.4. In addition, this snippet provided a button that shows how to enter in edit mode programmatically.

Snippet043TreeViewerKeyboardEditing.png

Snippet044 - Table Viewer Keyboard Editing


Demonstrates the JFace 3.3 keyboard editing support for Tables without columns. Tabbing from editor to editor is supported since 3.4.

You also need:

Snippet045 - Table Viewer Fill From Background Thread


Demonstrates how a TableViewer with a sorter can be filled from a NON-UI thread

Snippet045TableViewerFillFromBackgroundThread.gif

Snippet046 - Update Viewer From Background Thread


Demonstrates how to update a viewer from a long-running task (which is executed in a thread) and calls back to the UI-Thread using "asyncExec".

Snippet046UpdateViewerFromBackgroundThread.gif

Snippet047 - Virtual Lazy Tree Viewer


Demonstrates the usage of ILazyContentProvider in conjunction with a Virtual-TreeViewer. The snippet shows how using a lazy tree can minimize the memory footprint and maximize the speed when viewing large models.

Snippet047VirtualLazyTreeViewer.png

Snippet048 - Tree Viewer Tab With Checkbox


Demonstrates how to overcome a limitation when it comes to key-navigation and CheckBoxEditors in 3.3.1.

This is a workaround for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=198502

Snippet048TreeViewerTabWithCheckboxFor3 3.png

Snippet049 - Styled Cell Label Provider


Demonstrates a LabelProvider-Type which uses StyleRanges. This Snippet requires SWT/JFace 3.4.

Snippet049StyledCellLabelProvider.gif

Snippet050 - Delegating Styled Cell Label Provider


Demonstrates how you can add styled text by wrapping an existing label provider. This Snippet requires SWT/JFace 3.4.

Snippet050DelegatingStyledCellLabelProvider.png

Snippet051 - Table Centered Image


Demonstrate how to center an image and create graphics in a cell using a technique called "owner draw".

Snippet051TableCenteredImage.png

Snippet052 - Double Click Cell Editor


Demonstrate how to start cell-editors on double click.

Snippet052DoubleClickCellEditor.png

Snippet053 - Start Editor With Context Menu


Demonstrate how to start up a cell editor with a context menu and not with mouse clicking on the cell.

Snippet053StartEditorWithContextMenu.png

Snippet055 - Hide Show Column


Demonstrate hiding and showing columns and starting a cell editor programmatically.

Snippet055HideShowColumn.png

Snippet056 - Boolean Cell Editor


Demonstrate a custom cell-editor which uses a real Checkbox-Button

You also need these classes:


Snippet056BooleanCellEditor.png

Snippet057 - Table Viewer Skip Hidden Cells


Example of showing how easy cell-navigation with hidden cells is. Use the cursor keys to navigate between cells. Then use the context menu to hide a column.

Snippet057TableViewerSkipHiddenCells.png

Snippet058 - Cell Navigation


Shows how to automatically reveal cells when navigating. Run the snippet and then edit the first cell by double-clicking. Pressing the tab key will advance to the next cell in edit mode and reveal the cell if it is not in the viewport.

Snippet058CellNavigationIn34.gif

Snippet060 - Text Cell Editor With Content Proposal/Field assists


Show how to use content-proposal inside a CellEditor

Snippet060TextCellEditorWithContentProposal.png

Snippet061 - Faked Native Cell Editor


Full-featured native-looking viewer with checkboxes in an arbitrary column

You also need these classes:


Snippet061FakedNativeCellEditor.png

Snippet062 - Text And Dialog Cell Editor


Demonstrates usage of TextAndDialogCellEditor. The email column uses the TextAndDialogCellEditor; othe columns use ordinary TextCellEditor.

You also need these classes:


Snippet062TextAndDialogCellEditor.png

Snippet063 - Combo Viewer


Show how to use ComboViewer and set an initial selection

Snippet063ComboViewer.png

Snippet064 - Replacing elements in a TreeViewer with child elements


A TreeViewer with observable collections as input, to demonstrate, how elements are replaced, especially what happens to selected items on replacement

Snippet064TreeViewerReplacingElements.png

Snippet065 - Replacing elements in a TreeViewer without child elements


A TreeViewer with observable collections as input, to demonstrate, how elements are replaced, especially what happens to selected items on replacement

Snippet065TableViewerReplacingElements.png

Snippet066 - TableViewer with Label Decorator


A TableViewer that shows how to add a status icon to a Label with IStyledLabelProvider and DecorationOverlayIcon

Snippet066TableViewerWithLabelDecorator.png

Window

Snippet020 - Customized Control Tooltips


Demonstrates usage of JFace 3.3 to show really cool ToolTips for your controls

For full fun you also need:


Snippet020CustomizedControlTooltips.png

Snippet031 - Table Static Tooltip


Demonstrates creation of ToolTips for Tables without using the JFace-Viewers API but only JFace-Tooltips

Snippet031TableStaticTooltip.png

Wizard

Snippet047 - Wizard with Long Running Operation from Page


Demonstrates how to work with JFace-Wizards and fill a TableViewer from a Background-Thread without blocking the UI showing a progress bar in the meanwhile

Snippet047.gif

Snippet071 - Wizard with Progress and Cancel


Demonstrates a wizard with internal progress.

Snippet071WizardWithProgressAndCancel.gif

Snippet072 Wizard with Progress Subtasks and Cancel

Demonstrates a wizard with internal progress using SubMonitor and subtasks.

Snippet072WizardWithProgressSubtasksAndCancel.png


Snippet074 Wizard with access to application window


Demonstrates a wizard that enables access to the calling shell...

Snippet074ModelesWizard.gif

Back to the top