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.
Difference between revisions of "JFaceSnippets"
(→Snippet047 - Virtual Lazy Tree Viewer) |
|||
Line 10: | Line 10: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/dialogs/Snippet012DialogWithImageButtons.java Snippet012 - Dialog with Image Buttons] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/dialogs/Snippet012DialogWithImageButtons.java Snippet012 - Dialog with Image Buttons] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 | ||
Line 22: | Line 24: | ||
=== [https://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/dialogs/Snippet081AbstractNotificationPopup.java Snippet081 - Notication API] === | === [https://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/dialogs/Snippet081AbstractNotificationPopup.java Snippet081 - Notication API] === | ||
+ | * [https://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/dialogs/Snippet081AbstractNotificationPopup.java Snippet081 - Notication API] | ||
+ | |||
Demonstrates usage of the non-blocking notification API | Demonstrates usage of the non-blocking notification API | ||
Line 31: | Line 35: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/layout/Snippet013GridLayoutFactory.java Snippet013 - Grid Layout Factory] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/layout/Snippet013GridLayoutFactory.java Snippet013 - Grid Layout Factory] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 enhance readability | Demonstrates usage of the GridLayoutFactory to enhance readability | ||
Line 39: | Line 45: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/layout/Snippet016TableLayout.java Snippet016 - Table Layout] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/layout/Snippet016TableLayout.java Snippet016 - Table Layout] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/layout/Snippet016TableLayout.java Snippet016 - Table Layout] | ||
+ | |||
Demonstrates (dynamic)layout support for TableColumns available as of JFace 3.3 | Demonstrates (dynamic)layout support for TableColumns available as of JFace 3.3 | ||
Line 45: | Line 53: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/layout/Snippet027TreeLayout.java Snippet027 - Tree Layout] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/layout/Snippet027TreeLayout.java Snippet027 - Tree Layout] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 | Demonstrates (dynamic)layout support for TreeColumns available as of JFace 3.3 | ||
Line 53: | Line 63: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet001TableViewer.java Snippet001 - Table Viewer] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet001TableViewer.java Snippet001 - Table Viewer] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 59: | Line 71: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet002TreeViewer.java Snippet002 - Tree Viewer] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet002TreeViewer.java Snippet002 - Tree Viewer] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 65: | Line 79: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet003TableLabelProvider.java Snippet003 - Table Label Provider] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet003TableLabelProvider.java Snippet003 - Table Label Provider] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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]'' | ||
Line 71: | Line 87: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet004HideSelection.java Snippet004 - Hide Selection] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet004HideSelection.java Snippet004 - Hide Selection] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 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 | 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 | ||
Line 77: | Line 95: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet005TreeCustomMenu.java Snippet005 - Tree Custom Menu] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet005TreeCustomMenu.java Snippet005 - Tree Custom Menu] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 83: | Line 103: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet006TableMultiLineCells.java Snippet006 - Table Multi Line Cells] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet006TableMultiLineCells.java Snippet006 - Table Multi Line Cells] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 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. | 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. | ||
Line 89: | Line 111: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet007FullSelection.java Snippet007 - Full Selection] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet007FullSelection.java Snippet007 - Full Selection] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet007FullSelection.java 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. | 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. | ||
Line 95: | Line 119: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet008RevealElement.java Snippet008 - Reveal Element] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet008RevealElement.java Snippet008 - Reveal Element] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 101: | Line 127: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet009CellEditors.java Snippet009 - Cell Editors] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet009CellEditors.java Snippet009 - Cell Editors] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 107: | Line 135: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet010OwnerDraw.java Snippet010 - Owner Draw] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet010OwnerDraw.java Snippet010 - Owner Draw] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet010OwnerDraw.java 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''. | 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''. | ||
Line 113: | Line 143: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet011CustomTooltips.java Snippet011 - Custom Tooltips] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet011CustomTooltips.java Snippet011 - Custom Tooltips] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 | Demonstrates usage of custom tooltip support in 3.3 used to provide a tooltip for each cell in TableViewer | ||
Line 119: | Line 151: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet013TableViewerNoMandatoryLabelProvider.java Snippet013 - Table Viewer No Mandatory Label Provider]] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet013TableViewerNoMandatoryLabelProvider.java Snippet013 - Table Viewer No Mandatory Label Provider]] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 none mandatory LabelProviders in TableViewers to set colors and fonts with 3.2-API | Demonstrates usage of none mandatory LabelProviders in TableViewers to set colors and fonts with 3.2-API | ||
Line 125: | Line 159: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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/plain/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/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet014TreeViewerNoMandatoryLabelProvider.java Snippet014 - Tree Viewer No Mandatory Label Provider]] | ||
+ | |||
+ | |||
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 | ||
Line 130: | Line 167: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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/plain/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/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet015CustomTooltipsForTree.java Snippet015 - Custom Tooltips For Tree] | ||
+ | |||
+ | |||
Demonstrates usage of custom tooltip support used to provide a tooltip for each cell in a TreeViewer | Demonstrates usage of custom tooltip support used to provide a tooltip for each cell in a TreeViewer | ||
Line 135: | Line 175: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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/plain/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/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet017TableViewerHideShowColumns.java Snippet017 - Table Viewer Hide Show Columns] | ||
+ | |||
+ | |||
Demonstrates hiding and showing columns (animated) | Demonstrates hiding and showing columns (animated) | ||
Line 140: | Line 183: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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/plain/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/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet019TableViewerAddRemoveColumnsWithEditing.java Snippet019 - Table Viewer Add Remove Columns With Editing] | ||
+ | |||
+ | |||
Demonstrates adding/removing of columns in conjunction with the inline editing with JFace-API | Demonstrates adding/removing of columns in conjunction with the inline editing with JFace-API | ||
Line 145: | Line 191: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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/plain/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/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet024TableViewerExploreNewAPI.java Snippet024 - Table Viewer Explore] | ||
+ | |||
+ | |||
Demonstrates the base classes of 3.3 API | Demonstrates the base classes of 3.3 API | ||
Line 150: | Line 199: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet025TabEditing.java Snippet025 - Tab Editing] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet025TabEditing.java Snippet025 - Tab Editing] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 | Demonstrates how one can use the 3.3 API to add tab-editing support to your viewer | ||
Line 157: | Line 209: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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/plain/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/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet026TreeViewerTabEditing.java 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) | 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) | ||
Line 162: | Line 217: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet027ComboBoxCellEditors.java Snippet027 - Combo Box Cell Editors] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet027ComboBoxCellEditors.java Snippet027 - Combo Box Cell Editors] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 | ||
Line 167: | Line 225: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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/plain/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/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet029VirtualTableViewer.java 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. | 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. | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet030VirtualLazyTableViewer.java Snippet030 - Virtual Lazy Table Viewer] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet030VirtualLazyTableViewer.java Snippet030 - Virtual Lazy Table Viewer] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 | Demonstrates usage of JFace-Viewer virtual mode with a lazy content provider | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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/plain/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/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet031TableViewerCustomTooltipsMultiSelection.java Snippet031 - Table Viewer Custom Tooltips Multi Selection]] | ||
+ | |||
+ | |||
Demonstrates creation of tooltips for cells for pre 3.3 users | Demonstrates creation of tooltips for cells for pre 3.3 users | ||
Line 178: | Line 245: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet034CellEditorPerRow.java Snippet034 - Cell Editor Per Row] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet034CellEditorPerRow.java Snippet034 - Cell Editor Per Row] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 | ||
Line 183: | Line 253: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet035TableCursorCellHighlighter.java Snippet035 - Table Cursor Cell Highlighter] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet035TableCursorCellHighlighter.java Snippet035 - Table Cursor Cell Highlighter] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 | Demonstrates keyboard navigation in TableViewers using a TableCursor showing the flexibility of the cell navigation support | ||
Line 194: | Line 267: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet036FocusBorderCellHighlighter.java Snippet036 - Focus Border Cell Highlighter] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet036FocusBorderCellHighlighter.java Snippet036 - Focus Border Cell Highlighter] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 | Demonstrates keyboard navigation by highlighting the currently selected cell with a focus border showing once more the flexibility of the cell navigation support | ||
Line 203: | Line 279: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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/plain/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/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet037FancyCustomTooltips.java Snippet037 - Fancy Custom Tooltips] | ||
+ | |||
+ | |||
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 | ||
Line 208: | Line 287: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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/plain/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/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet039ListViewer.java Snippet039 - List Viewer] | ||
+ | |||
+ | |||
Demonstrates a very simple usage of ListViewer | Demonstrates a very simple usage of ListViewer | ||
Line 213: | Line 295: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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/plain/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/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet040TableViewerSorting.java Snippet040 - Table Viewer Sorting] | ||
+ | |||
+ | |||
Demonstrates sorting (ascending/descending) in TableViewers by clicking the column header. | Demonstrates sorting (ascending/descending) in TableViewers by clicking the column header. | ||
Line 218: | Line 303: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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/plain/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/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet041TableViewerAlternatingColors.java 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. | 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. | ||
Line 223: | Line 311: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet043TreeViewerKeyboardEditing.java Snippet043 - Tree Viewer Keyboard Editing] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet043TreeViewerKeyboardEditing.java Snippet043 - Tree Viewer Keyboard Editing] === | ||
+ | * http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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. | 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. | ||
Line 228: | Line 319: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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/plain/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/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet044TableViewerKeyboardEditing.java 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. | Demonstrates the JFace 3.3 keyboard editing support for Tables without columns. Tabbing from editor to editor is supported since 3.4. | ||
Line 234: | Line 328: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet045TableViewerFillFromBackgroundThread.java Snippet045 - Table Viewer Fill From Background Thread] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet045TableViewerFillFromBackgroundThread.java Snippet045 - Table Viewer Fill From Background Thread] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 | ||
Line 239: | Line 336: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet046UpdateViewerFromBackgroundThread.java Snippet046 - Update Viewer From Background Thread] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet046UpdateViewerFromBackgroundThread.java Snippet046 - Update Viewer From Background Thread] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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". | 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". | ||
Line 252: | Line 352: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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/plain/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/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet048TreeViewerTabWithCheckboxFor3_3.java Snippet048 - Tree Viewer Tab With Checkbox] | ||
+ | |||
+ | |||
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. | ||
Line 259: | Line 362: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet049StyledCellLabelProvider.java Snippet049 - Styled Cell Label Provider] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet049StyledCellLabelProvider.java Snippet049 - Styled Cell Label Provider] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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. | Demonstrates a LabelProvider-Type which uses StyleRanges. This Snippet requires SWT/JFace 3.4. | ||
Line 264: | Line 370: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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/plain/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/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet050DelegatingStyledCellLabelProvider.java 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. | Demonstrates how you can add styled text by wrapping an existing label provider. This Snippet requires SWT/JFace 3.4. | ||
Line 269: | Line 378: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet051TableCenteredImage.java Snippet051 - Table Centered Image] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet051TableCenteredImage.java Snippet051 - Table Centered Image] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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". | Demonstrate how to center an image and create graphics in a cell using a technique called "owner draw". | ||
Line 274: | Line 386: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet052DoubleClickCellEditor.java Snippet052 - Double Click Cell Editor] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet052DoubleClickCellEditor.java Snippet052 - Double Click Cell Editor] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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. | Demonstrate how to start cell-editors on double click. | ||
Line 279: | Line 394: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet053StartEditorWithContextMenu.java Snippet053 - Start Editor With Context Menu] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet053StartEditorWithContextMenu.java Snippet053 - Start Editor With Context Menu] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet053StartEditorWithContextMenu.java 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. | Demonstrate how to start up a cell editor with a context menu and not with mouse clicking on the cell. | ||
Line 284: | Line 402: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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/plain/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/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet055HideShowColumn.java Snippet055 - Hide Show Column] | ||
+ | |||
+ | |||
Demonstrate hiding and showing columns and starting a cell editor programmatically. | Demonstrate hiding and showing columns and starting a cell editor programmatically. | ||
Line 289: | Line 410: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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/plain/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/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet056BooleanCellEditor.java Snippet056 - Boolean Cell Editor] | ||
+ | |||
+ | |||
Demonstrate a custom cell-editor which uses a real Checkbox-Button | Demonstrate a custom cell-editor which uses a real Checkbox-Button | ||
Line 298: | Line 422: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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/plain/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/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet057TableViewerSkipHiddenCells.java 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. | 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. | ||
Line 303: | Line 430: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet058CellNavigationIn34.java Snippet058 - Cell Navigation] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet058CellNavigationIn34.java Snippet058 - Cell Navigation] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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. | 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. | ||
Line 308: | Line 438: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet060TextCellEditorWithContentProposal.java Snippet060 - Text Cell Editor With Content Proposal/Field assists] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet060TextCellEditorWithContentProposal.java Snippet060 - Text Cell Editor With Content Proposal/Field assists] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 | ||
Line 313: | Line 446: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet061FakedNativeCellEditor.java Snippet061 - Faked Native Cell Editor] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet061FakedNativeCellEditor.java Snippet061 - Faked Native Cell Editor] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 | Full-featured native-looking viewer with checkboxes in an arbitrary column | ||
Line 323: | Line 459: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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/plain/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/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet062TextAndDialogCellEditor.java Snippet062 - Text And Dialog Cell Editor] | ||
+ | |||
+ | |||
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. | ||
Line 332: | Line 471: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet063ComboViewer.java Snippet063 - Combo Viewer] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet063ComboViewer.java Snippet063 - Combo Viewer] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 | Show how to use ComboViewer and set an initial selection | ||
Line 337: | Line 479: | ||
=== [https://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 | A TreeViewer with observable collections as input, to demonstrate, how elements are replaced, especially what happens to selected items on replacement | ||
Line 342: | Line 487: | ||
=== [https://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 | A TreeViewer with observable collections as input, to demonstrate, how elements are replaced, especially what happens to selected items on replacement | ||
Line 347: | Line 495: | ||
=== [https://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet066TableViewerWithLabelDecorator.java Snippet066 - TableViewer with Label Decorator] === | === [https://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet066TableViewerWithLabelDecorator.java Snippet066 - TableViewer with Label Decorator] === | ||
+ | * [https://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 | A TableViewer that shows how to add a status icon to a Label with IStyledLabelProvider and DecorationOverlayIcon | ||
Line 354: | Line 505: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/window/Snippet020CustomizedControlTooltips.java Snippet020 - Customized Control Tooltips] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/window/Snippet020CustomizedControlTooltips.java Snippet020 - Customized Control Tooltips] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/window/Snippet020CustomizedControlTooltips.java Snippet020 - Customized Control Tooltips] | ||
+ | |||
+ | |||
Demonstrates usage of JFace 3.3 to show really cool ToolTips for your controls | Demonstrates usage of JFace 3.3 to show really cool ToolTips for your controls | ||
Line 364: | Line 518: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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/plain/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/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/window/Snippet031TableStaticTooltip.java Snippet031 - Table Static Tooltip] | ||
+ | |||
+ | |||
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 | ||
Line 371: | Line 528: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/wizard/Snippet047WizardWithLongRunningOperation.java Snippet047 - Wizard with Long Running Operation from Page] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/wizard/Snippet047WizardWithLongRunningOperation.java Snippet047 - Wizard with Long Running Operation from Page] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 | 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 | ||
Line 376: | Line 536: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/wizard/Snippet071WizardWithProgressAndCancel.java Snippet071 - Wizard with Progress and Cancel] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/wizard/Snippet071WizardWithProgressAndCancel.java Snippet071 - Wizard with Progress and Cancel] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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. | Demonstrates a wizard with internal progress. | ||
Line 381: | Line 544: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/wizard/Snippet072WizardWithProgressSubtasksAndCancel.java Snippet072 Wizard with Progress Subtasks and Cancel] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/wizard/Snippet072WizardWithProgressSubtasksAndCancel.java Snippet072 Wizard with Progress Subtasks and Cancel] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/wizard/Snippet072WizardWithProgressSubtasksAndCancel.java Snippet072 Wizard with Progress Subtasks and Cancel] | ||
+ | |||
Demonstrates a wizard with internal progress using SubMonitor and subtasks. | Demonstrates a wizard with internal progress using SubMonitor and subtasks. | ||
Line 388: | Line 553: | ||
=== [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/wizard/Snippet074ModelesWizard.java Snippet074 Wizard with access to application window] === | === [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/wizard/Snippet074ModelesWizard.java Snippet074 Wizard with access to application window] === | ||
+ | * [http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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 a wizard that enables access to the calling shell... |
Revision as of 03:59, 4 July 2022
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
- 1 Dialogs
- 2 Notification
- 3 Layout
- 4 Viewers
- 4.1 Snippet001 - Table Viewer
- 4.2 Snippet002 - Tree Viewer
- 4.3 Snippet003 - Table Label Provider
- 4.4 Snippet004 - Hide Selection
- 4.5 Snippet005 - Tree Custom Menu
- 4.6 Snippet006 - Table Multi Line Cells
- 4.7 Snippet007 - Full Selection
- 4.8 Snippet008 - Reveal Element
- 4.9 Snippet009 - Cell Editors
- 4.10 Snippet010 - Owner Draw
- 4.11 Snippet011 - Custom Tooltips
- 4.12 Snippet013 - Table Viewer No Mandatory Label Provider]
- 4.13 Snippet014 - Tree Viewer No Mandatory Label Provider]
- 4.14 Snippet015 - Custom Tooltips For Tree
- 4.15 Snippet017 - Table Viewer Hide Show Columns
- 4.16 Snippet019 - Table Viewer Add Remove Columns With Editing
- 4.17 Snippet024 - Table Viewer Explore
- 4.18 Snippet025 - Tab Editing
- 4.19 Snippet026 - Tree Viewer Tab Editing
- 4.20 Snippet027 - Combo Box Cell Editors
- 4.21 Snippet029 - Virtual Table Viewer
- 4.22 Snippet030 - Virtual Lazy Table Viewer
- 4.23 Snippet031 - Table Viewer Custom Tooltips Multi Selection]
- 4.24 Snippet034 - Cell Editor Per Row
- 4.25 Snippet035 - Table Cursor Cell Highlighter
- 4.26 Snippet036 - Focus Border Cell Highlighter
- 4.27 Snippet037 - Fancy Custom Tooltips
- 4.28 Snippet039 - List Viewer
- 4.29 Snippet040 - Table Viewer Sorting
- 4.30 Snippet 041 - Table Viewer Alternating Colors and Viewer Filters
- 4.31 Snippet043 - Tree Viewer Keyboard Editing
- 4.32 Snippet044 - Table Viewer Keyboard Editing
- 4.33 Snippet045 - Table Viewer Fill From Background Thread
- 4.34 Snippet046 - Update Viewer From Background Thread
- 4.35 Snippet047 - Virtual Lazy Tree Viewer
- 4.36 Snippet048 - Tree Viewer Tab With Checkbox
- 4.37 Snippet049 - Styled Cell Label Provider
- 4.38 Snippet050 - Delegating Styled Cell Label Provider
- 4.39 Snippet051 - Table Centered Image
- 4.40 Snippet052 - Double Click Cell Editor
- 4.41 Snippet053 - Start Editor With Context Menu
- 4.42 Snippet055 - Hide Show Column
- 4.43 Snippet056 - Boolean Cell Editor
- 4.44 Snippet057 - Table Viewer Skip Hidden Cells
- 4.45 Snippet058 - Cell Navigation
- 4.46 Snippet060 - Text Cell Editor With Content Proposal/Field assists
- 4.47 Snippet061 - Faked Native Cell Editor
- 4.48 Snippet062 - Text And Dialog Cell Editor
- 4.49 Snippet063 - Combo Viewer
- 4.50 Snippet064 - Replacing elements in a TreeViewer with child elements
- 4.51 Snippet065 - Replacing elements in a TreeViewer without child elements
- 4.52 Snippet066 - TableViewer with Label Decorator
- 5 Window
- 6 Wizard
Dialogs
Snippet012 - Dialog with Image Buttons
Demonstrates usage of Icons in Buttons of Dialogs
Drop these icons also in the same package
Notification
Snippet081 - Notication API
Demonstrates usage of the non-blocking notification API
Layout
Snippet013 - Grid Layout Factory
Demonstrates usage of the GridLayoutFactory to enhance readability
Snippet016 - Table Layout
Demonstrates (dynamic)layout support for TableColumns available as of JFace 3.3
Snippet027 - Tree Layout
Demonstrates (dynamic)layout support for TreeColumns available as of JFace 3.3
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)
Snippet002 - Tree Viewer
Demonstrates a simply TreeViewer with one column. It describes all important classes used for all Tree-like JFace-Viewers (LabelProvider,ITreeContentProvider)
Snippet003 - Table Label Provider
Demonstrates tables with more than one column and the usage of ITableLabelProvider
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
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
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.
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.
Snippet008 - Reveal Element
Demonstrates how you can scroll a TableViewer to the specific model element using TableViewer#reveal(Object)
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)
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.
Snippet011 - Custom Tooltips
Demonstrates usage of custom tooltip support in 3.3 used to provide a tooltip for each cell in TableViewer
Snippet013 - Table Viewer No Mandatory Label Provider]
Demonstrates usage of none mandatory LabelProviders in TableViewers to set colors and fonts with 3.2-API
Snippet014 - Tree Viewer No Mandatory Label Provider]
Demonstrates usage of none mandatory LabelProviders in TreeViewers to set colors and font with 3.2-API
Snippet015 - Custom Tooltips For Tree
Demonstrates usage of custom tooltip support used to provide a tooltip for each cell in a TreeViewer
Snippet017 - Table Viewer Hide Show Columns
Demonstrates hiding and showing columns (animated)
Snippet019 - Table Viewer Add Remove Columns With Editing
Demonstrates adding/removing of columns in conjunction with the inline editing with JFace-API
Snippet024 - Table Viewer Explore
Demonstrates the base classes of 3.3 API
Snippet025 - Tab Editing
Demonstrates how one can use the 3.3 API to add tab-editing support to your viewer
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)
Snippet027 - Combo Box Cell Editors
Demonstrates usage of the ComboBoxCellEditor in JFace-Viewers
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
Snippet034 - Cell Editor Per Row
Demonstrates different CellEditor-Types in one COLUMN of JFace-Viewers
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:
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:
Snippet037 - Fancy Custom Tooltips
Demonstrates customizability of the 3.3 JFace-Support for cell tooltips using the Browser-Widget and presenting HTML
Snippet039 - List Viewer
Demonstrates a very simple usage of ListViewer
Snippet040 - Table Viewer Sorting
Demonstrates sorting (ascending/descending) in TableViewers by clicking the column header.
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.
Snippet043 - Tree Viewer Keyboard Editing
- http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/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.
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
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".
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.
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
Snippet049 - Styled Cell Label Provider
Demonstrates a LabelProvider-Type which uses StyleRanges. This Snippet requires SWT/JFace 3.4.
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.
Snippet051 - Table Centered Image
Demonstrate how to center an image and create graphics in a cell using a technique called "owner draw".
Snippet052 - Double Click Cell Editor
Demonstrate how to start cell-editors on double click.
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.
Snippet055 - Hide Show Column
- http://git.eclipse.org/c/platform/eclipse.platform.ui.git/plain/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet055HideShowColumn.java Snippet055 - Hide Show Column]
Demonstrate hiding and showing columns and starting a cell editor programmatically.
Snippet056 - Boolean Cell Editor
Demonstrate a custom cell-editor which uses a real Checkbox-Button
You also need these classes:
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.
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.
Snippet060 - Text Cell Editor With Content Proposal/Field assists
Show how to use content-proposal inside a CellEditor
Snippet061 - Faked Native Cell Editor
Full-featured native-looking viewer with checkboxes in an arbitrary column
You also need these classes:
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:
Snippet063 - Combo Viewer
Show how to use ComboViewer and set an initial selection
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
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
Snippet066 - TableViewer with Label Decorator
A TableViewer that shows how to add a status icon to a Label with IStyledLabelProvider and DecorationOverlayIcon
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:
Snippet031 - Table Static Tooltip
Demonstrates creation of ToolTips for Tables without using the JFace-Viewers API but only JFace-Tooltips
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
Snippet071 - Wizard with Progress and Cancel
Demonstrates a wizard with internal progress.
Snippet072 Wizard with Progress Subtasks and Cancel
Demonstrates a wizard with internal progress using SubMonitor and subtasks.
Snippet074 Wizard with access to application window
Demonstrates a wizard that enables access to the calling shell...