Skip to main content
Jump to: navigation, search

Difference between revisions of "GEF/GEF4/Zest/Examples"

< GEF‎ | GEF4‎ | Zest
 
(5 intermediate revisions by 2 users not shown)
Line 38: Line 38:
  
 
[[File:GEF4-Zest-Examples-CustomNodeExample.png|400px]]
 
[[File:GEF4-Zest-Examples-CustomNodeExample.png|400px]]
 
==== FisheyeExample ====
 
 
* '''class [http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples/src/org/eclipse/gef4/zest/examples/FisheyeExample.java org.eclipse.gef4.zest.examples.FisheyeExample]'''
 
 
[[File:GEF4-Zest-Examples-FisheyeExample.png|400px]]
 
  
 
==== SimpleExample ====
 
==== SimpleExample ====
Line 53: Line 47:
 
----
 
----
  
== Examples.UI (undeployed) ==
+
== Examples.JFace (undeployed) ==
  
*'''bundle: org.eclipse.gef4.zest.examples.ui'''
+
*'''bundle: org.eclipse.gef4.zest.examples.JFace'''
  
The examples provided by [[#Examples.UI (undeployed)|Examples.UI]] demonstrate how to use the JFace-API provided by [[GEF/GEF4/Zest#Zest.FX.UI|GEF4 Zest.FX.UI]]. They are not deployed on our update-sites and have to checked out in source (<code>org.eclipse.gef4.zest.examples.ui</code>) from our [http://git.eclipse.org/c/gef/org.eclipse.gef4.git/ GEF4 Git repository]. In order to have the example plug-in compile properly, all other required GEF4 bundles will either have to be installed (in a matching version) into your running eclipse platform (if this is used as target), added to a target definition (the target definitions contained in <code>org.eclipse.gef4.target</code> may be augmented for this purpose), or checked out in source as well. You will also have to install e(fx)clipse in your running eclipse instance and target platform (see [[GEF/Contributor Guide | GEF Project Contributor Guide]] for details on how to obtain the sources and setup your workspace). Having prepared everything as outlined before, the standalone example might easily be started by launching one of the following example classes from <code>org.eclipse.gef4.zest.examples.ui</code> via the context menu ('Run As' -> 'Java Application').
+
The examples provided by [[#Examples.JFace (undeployed)|Examples.JFace]] demonstrate how to use the JFace-API provided by [[GEF/GEF4/Zest#Zest.FX.JFace|GEF4 Zest.FX.JFace]]. They are not deployed on our update-sites and have to checked out in source (<code>org.eclipse.gef4.zest.examples.jface</code>) from our [http://git.eclipse.org/c/gef/org.eclipse.gef4.git/ GEF4 Git repository]. In order to have the example plug-in compile properly, all other required GEF4 bundles will either have to be installed (in a matching version) into your running eclipse platform (if this is used as target), added to a target definition (the target definitions contained in <code>org.eclipse.gef4.target</code> may be augmented for this purpose), or checked out in source as well. You will also have to install e(fx)clipse in your running eclipse instance and target platform (see [[GEF/Contributor Guide | GEF Project Contributor Guide]] for details on how to obtain the sources and setup your workspace). Having prepared everything as outlined before, the standalone example might easily be started by launching one of the following example classes from <code>org.eclipse.gef4.zest.examples.jface</code> via the context menu ('Run As' -> 'Java Application').
  
 
==== JFaceColorsExample ====
 
==== JFaceColorsExample ====
  
*'''class [http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples.ui/src/org/eclipse/gef4/zest/examples/ui/JFaceColorsExample.java org.eclipse.gef4.zest.examples.ui.JFaceColorsExample]'''
+
*'''class [http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples.jface/src/org/eclipse/gef4/zest/examples/jface/JFaceColorsExample.java org.eclipse.gef4.zest.examples.jface.JFaceColorsExample]'''
  
 
The <code>JFaceColorsExample</code> demonstrate how an [http://help.eclipse.org/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/ILabelProvider.html org.eclipse.jface.viewers.ILabelProvider] implementing [http://help.eclipse.org/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/IColorProvider.html org.eclipse.jface.viewers.IColorProvider] can be used to set foreground and background colors.
 
The <code>JFaceColorsExample</code> demonstrate how an [http://help.eclipse.org/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/ILabelProvider.html org.eclipse.jface.viewers.ILabelProvider] implementing [http://help.eclipse.org/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/IColorProvider.html org.eclipse.jface.viewers.IColorProvider] can be used to set foreground and background colors.
Line 69: Line 63:
 
==== JFaceCustomNodeExample ====
 
==== JFaceCustomNodeExample ====
  
*'''class [http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples.ui/src/org/eclipse/gef4/zest/examples/ui/JFaceCustomNodeExample.java org.eclipse.gef4.zest.examples.ui.JFaceCustomNodeExample]'''
+
*'''class [http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples.jface/src/org/eclipse/gef4/zest/examples/jface/JFaceCustomNodeExample.java org.eclipse.gef4.zest.examples.jface.JFaceCustomNodeExample]'''
  
The <code>JFaceCustomNodeExample</code> demonstrates how a custom visual can be provided by exchanging the [[GEF/GEF4/Zest#GraphContentPart, NodeContentPart, EdgeContentPart, EdgeLabelPart, ContentPartFactory|NodeContentPart]] and [[GEF/GEF4/Zest#GraphContentPart, NodeContentPart, EdgeContentPart, EdgeLabelPart, ContentPartFactory|ContentPartFactory]].
+
The <code>JFaceCustomNodeExample</code> demonstrates how a custom visual can be provided by exchanging the [[GEF/GEF4/Zest#GraphPart, NodePart, NodeLabelPart, EdgePart, EdgeLabelPart, ZestFxContentPartFactory|NodePart]] and [[GEF/GEF4/Zest#GraphPart, NodePart, NodeLabelPart, EdgePart, EdgeLabelPart, ZestFxContentPartFactory|ZestFxContentPartFactory]].
  
 
[[File:GEF4-Zest-Examples-UI-JFaceCustomNodeExample.png|400px]]
 
[[File:GEF4-Zest-Examples-UI-JFaceCustomNodeExample.png|400px]]
Line 77: Line 71:
 
==== JFaceEdgeDecorationExample ====
 
==== JFaceEdgeDecorationExample ====
  
*'''class [http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples.ui/src/org/eclipse/gef4/zest/examples/ui/JFaceEdgeDecorationExample.java org.eclipse.gef4.zest.examples.ui.JFaceEdgeDecorationExample]'''
+
*'''class [http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples.jface/src/org/eclipse/gef4/zest/examples/jface/JFaceEdgeDecorationExample.java org.eclipse.gef4.zest.examples.jface.JFaceEdgeDecorationExample]'''
  
The <code>JFaceEdgeDecorationExample</code> demonstrates how an [http://help.eclipse.org/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/ILabelProvider.html org.eclipse.jface.viewers.ILabelProvider] implementing [[GEF/GEF4/Zest#IEdgeDecorationProvider|IEdgeDecorationProvider]] can be used to provide decorations for edges.
+
The <code>JFaceEdgeDecorationExample</code> demonstrates how an [http://help.eclipse.org/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/ILabelProvider.html org.eclipse.jface.viewers.ILabelProvider] implementing [[GEF/GEF4/Zest#IGraphAttributesProvider|IGraphAttributesProvider]] can be used to provide decorations for edges.
  
 
[[File:GEF4-Zest-Examples-UI-JFaceEdgeDecorationExample.png|400px]]
 
[[File:GEF4-Zest-Examples-UI-JFaceEdgeDecorationExample.png|400px]]
Line 85: Line 79:
 
==== JFaceEdgeRouterExample ====
 
==== JFaceEdgeRouterExample ====
  
*'''class [http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples.ui/src/org/eclipse/gef4/zest/examples/ui/JFaceEdgeRouterExample.java org.eclipse.gef4.zest.examples.ui.JFaceEdgeRouterExample]'''
+
*'''class [http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples.jface/src/org/eclipse/gef4/zest/examples/jface/JFaceEdgeRouterExample.java org.eclipse.gef4.zest.examples.jface.JFaceEdgeRouterExample]'''
  
The <code>JFaceEdgeRouterExample</code> demonstrates how an [http://help.eclipse.org/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/ILabelProvider.html org.eclipse.jface.viewers.ILabelProvider] implementing [[#IGraphNodeLabelProvider, INestedGraphLabelProvider|IGraphNodeLabelProvider]] can be used to change the connection router of edges.
+
The <code>JFaceEdgeRouterExample</code> demonstrates how an [http://help.eclipse.org/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/ILabelProvider.html org.eclipse.jface.viewers.ILabelProvider] implementing [[GEF/GEF4/Zest#IGraphAttributesProvider|IGraphAttributesProvider]] can be used to change the connection router of edges.
  
 
[[File:GEF4-Zest-Examples-UI-JFaceEdgeRouterExample.png|400px]]
 
[[File:GEF4-Zest-Examples-UI-JFaceEdgeRouterExample.png|400px]]
Line 93: Line 87:
 
==== JFaceFontsExample ====
 
==== JFaceFontsExample ====
  
*'''class [http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples.ui/src/org/eclipse/gef4/zest/examples/ui/JFaceFontsExample.java org.eclipse.gef4.zest.examples.ui.JFaceFontsExample]'''
+
*'''class [http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples.jface/src/org/eclipse/gef4/zest/examples/jface/JFaceFontsExample.java org.eclipse.gef4.zest.examples.jface.JFaceFontsExample]'''
  
 
The <code>JFaceFontsExample</code> demonstrates how an [http://help.eclipse.org/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/ILabelProvider.html org.eclipse.jface.viewers.ILabelProvider] implementing [http://help.eclipse.org/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/IFontProvider.html org.eclipse.jface.viewers.IFontProvider] can be used to change the label font of nodes.
 
The <code>JFaceFontsExample</code> demonstrates how an [http://help.eclipse.org/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/ILabelProvider.html org.eclipse.jface.viewers.ILabelProvider] implementing [http://help.eclipse.org/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/IFontProvider.html org.eclipse.jface.viewers.IFontProvider] can be used to change the label font of nodes.
Line 101: Line 95:
 
==== JFaceNestingExample ====
 
==== JFaceNestingExample ====
  
*'''class [http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples.ui/src/org/eclipse/gef4/zest/examples/ui/JFaceNestingExample.java org.eclipse.gef4.zest.examples.ui.JFaceNestingExample]'''
+
*'''class [http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples.jface/src/org/eclipse/gef4/zest/examples/jface/JFaceNestingExample.java org.eclipse.gef4.zest.examples.jface.JFaceNestingExample]'''
  
The <code>JFaceNestingExample</code> demonstrates how an [http://help.eclipse.org/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/IContentProvider.html org.eclipse.jface.viewers.IContentProvider] implementing [[GEF/GEF4/Zest#INestedGraphContentProvider|INestedGraphContentProvider]] can be used to provide nested graphs.
+
The <code>JFaceNestingExample</code> demonstrates how an [http://help.eclipse.org/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/IContentProvider.html org.eclipse.jface.viewers.IContentProvider] implementing [[GEF/GEF4/Zest#IGraphContentProvider|IGraphContentProvider]] can provide nested graphs.
  
 
[[File:GEF4-Zest-Examples-UI-JFaceNestingExample.png|400px]]
 
[[File:GEF4-Zest-Examples-UI-JFaceNestingExample.png|400px]]
Line 109: Line 103:
 
==== JFaceSimpleExample ====
 
==== JFaceSimpleExample ====
  
*'''class [http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples.ui/src/org/eclipse/gef4/zest/examples/ui/JFaceSimpleExample.java org.eclipse.gef4.zest.examples.ui.JFaceSimpleExample]'''
+
*'''class [http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples.jface/src/org/eclipse/gef4/zest/examples/jface/JFaceSimpleExample.java org.eclipse.gef4.zest.examples.jface.JFaceSimpleExample]'''
  
 
The <code>JFaceSimpleExample</code> demonstrates the basic usage of a [[GEF/GEF4/Zest#ZestContentViewer|ZestContentViewer]].
 
The <code>JFaceSimpleExample</code> demonstrates the basic usage of a [[GEF/GEF4/Zest#ZestContentViewer|ZestContentViewer]].
Line 117: Line 111:
 
==== JFaceTooltipExample ====
 
==== JFaceTooltipExample ====
  
*'''class [http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples.ui/src/org/eclipse/gef4/zest/examples/ui/JFaceTooltipExample.java org.eclipse.gef4.zest.examples.ui.JFaceTooltipExample]'''
+
*'''class [http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples.jface/src/org/eclipse/gef4/zest/examples/jface/JFaceTooltipExample.java org.eclipse.gef4.zest.examples.jface.JFaceTooltipExample]'''
  
 
The <code>JFaceTooltipExample</code> demonstrates how an [http://help.eclipse.org/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/ILabelProvider.html org.eclipse.jface.viewers.ILabelProvider] implementing [http://help.eclipse.org/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/IToolTipProvider.html org.eclipse.jface.viewers.IToolTipProvider] can be used to provide tooltips for nodes.
 
The <code>JFaceTooltipExample</code> demonstrates how an [http://help.eclipse.org/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/ILabelProvider.html org.eclipse.jface.viewers.ILabelProvider] implementing [http://help.eclipse.org/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/viewers/IToolTipProvider.html org.eclipse.jface.viewers.IToolTipProvider] can be used to provide tooltips for nodes.

Latest revision as of 07:26, 3 June 2016

Graph Example (Standalone, Eclipse UI)

The Graph Example is provided as a standalone JavaFX application as well as an Eclipse UI integration. It demonstrates all end-user visible features provided by GEF4 Zest.

Graph Example (Standalone)

  • bundle: org.eclipse.gef4.zest.examples.graph

The standalone JavaFX application is only indirectly-bundled on our update-site and can better be checked out in source (org.eclipse.gef4.zest.examples.graph) from our GEF4 Git repository. In order to have the example plug-in compile properly, all other required GEF4 bundles will either have to be installed (in a matching version) into your running eclipse platform (if this is used as target), added to a target definition (the target definitions contained in org.eclipse.gef4.target may be augmented for this purpose), or checked out in source as well. You will also have to install e(fx)clipse in your running eclipse instance and target platform (see GEF Project Contributor Guide for details on how to obtain the sources and setup your workspace). Having prepared everything as outlined before, the standalone example might easily be started by launching org.eclipse.gef4.zest.examples.graph.ZestGraphExample via the context menu ('Run As' -> 'Java Application').

GEF4 Zest stand-alone Graph example

Graph Example (UI-integration)

  • feature: org.eclipse.gef4.zest.examples
  • bundle: org.eclipse.gef4.zest.examples
  • bundle: org.eclipse.gef4.zest.examples.graph
  • bundle: org.eclipse.gef4.zest.examples.graph.ui

The Eclipse UI-integrated version of the Graph Example can simply be installed from our update-sites. It is accessible via the 'GEF4 Zest Graph Example' view, which can be opened via the Window -> Show View -> Other... menu, being located in the Other category.

Note that, if you are running on Linux with GTK3, you have to force SWT to use the GTK2 API by setting the environment variable SWT_GTK3 to 0, because of a JavaFX/SWT integration bug (Bugzilla #469126).

GEF4 Zest in Eclipse


Examples (undeployed)

  • bundle: org.eclipse.gef4.zest.examples

The examples provided by Examples demonstrate how to use the API provided by GEF4 Zest.FX. They are only indirectly bundled on our update-sites and should better be checked out in source (org.eclipse.gef4.zest.examples) from our GEF4 Git repository. In order to have the example plug-in compile properly, all other required GEF4 bundles will either have to be installed (in a matching version) into your running eclipse platform (if this is used as target), added to a target definition (the target definitions contained in org.eclipse.gef4.target may be augmented for this purpose), or checked out in source as well. You will also have to install e(fx)clipse in your running eclipse instance and target platform (see GEF Project Contributor Guide for details on how to obtain the sources and setup your workspace). Having prepared everything as outlined before, the standalone example might easily be started by launching one of the following example classes from org.eclipse.gef4.zest.examples via the context menu ('Run As' -> 'Java Application').

CustomNodeExample

GEF4-Zest-Examples-CustomNodeExample.png

SimpleExample

GEF4-Zest-Examples-SimpleExample.png


Examples.JFace (undeployed)

  • bundle: org.eclipse.gef4.zest.examples.JFace

The examples provided by Examples.JFace demonstrate how to use the JFace-API provided by GEF4 Zest.FX.JFace. They are not deployed on our update-sites and have to checked out in source (org.eclipse.gef4.zest.examples.jface) from our GEF4 Git repository. In order to have the example plug-in compile properly, all other required GEF4 bundles will either have to be installed (in a matching version) into your running eclipse platform (if this is used as target), added to a target definition (the target definitions contained in org.eclipse.gef4.target may be augmented for this purpose), or checked out in source as well. You will also have to install e(fx)clipse in your running eclipse instance and target platform (see GEF Project Contributor Guide for details on how to obtain the sources and setup your workspace). Having prepared everything as outlined before, the standalone example might easily be started by launching one of the following example classes from org.eclipse.gef4.zest.examples.jface via the context menu ('Run As' -> 'Java Application').

JFaceColorsExample

The JFaceColorsExample demonstrate how an org.eclipse.jface.viewers.ILabelProvider implementing org.eclipse.jface.viewers.IColorProvider can be used to set foreground and background colors.

GEF4-Zest-Examples-UI-JFaceColorsExample.png

JFaceCustomNodeExample

The JFaceCustomNodeExample demonstrates how a custom visual can be provided by exchanging the NodePart and ZestFxContentPartFactory.

GEF4-Zest-Examples-UI-JFaceCustomNodeExample.png

JFaceEdgeDecorationExample

The JFaceEdgeDecorationExample demonstrates how an org.eclipse.jface.viewers.ILabelProvider implementing IGraphAttributesProvider can be used to provide decorations for edges.

GEF4-Zest-Examples-UI-JFaceEdgeDecorationExample.png

JFaceEdgeRouterExample

The JFaceEdgeRouterExample demonstrates how an org.eclipse.jface.viewers.ILabelProvider implementing IGraphAttributesProvider can be used to change the connection router of edges.

GEF4-Zest-Examples-UI-JFaceEdgeRouterExample.png

JFaceFontsExample

The JFaceFontsExample demonstrates how an org.eclipse.jface.viewers.ILabelProvider implementing org.eclipse.jface.viewers.IFontProvider can be used to change the label font of nodes.

GEF4-Zest-Examples-UI-JFaceFontsExample.png

JFaceNestingExample

The JFaceNestingExample demonstrates how an org.eclipse.jface.viewers.IContentProvider implementing IGraphContentProvider can provide nested graphs.

GEF4-Zest-Examples-UI-JFaceNestingExample.png

JFaceSimpleExample

The JFaceSimpleExample demonstrates the basic usage of a ZestContentViewer.

GEF4-Zest-Examples-UI-JFaceSimpleExample.png

JFaceTooltipExample

The JFaceTooltipExample demonstrates how an org.eclipse.jface.viewers.ILabelProvider implementing org.eclipse.jface.viewers.IToolTipProvider can be used to provide tooltips for nodes.

GEF4-Zest-Examples-UI-JFaceTooltipExample.png

Back to the top