Skip to content

Zest Examples

mwienand edited this page Aug 4, 2016 · 4 revisions

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 Zest.

Graph Example (Standalone)

  • bundle: org.eclipse.gef.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.gef.zest.examples.graph) from our GEF Git repository. In order to have the example plug-in compile properly, all other required GEF 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.gef.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.gef.zest.examples.graph.ZestGraphExample via the context menu ('Run As' -> 'Java Application').

GEF Zest stand-alone Graph example

Graph Example (UI-integration)

  • feature: org.eclipse.gef.zest.examples
  • bundle: org.eclipse.gef.zest.examples
  • bundle: org.eclipse.gef.zest.examples.graph
  • bundle: org.eclipse.gef.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).

GEF Zest in Eclipse


Examples (undeployed)

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

The examples provided by Examples demonstrate how to use the API provided by Zest.FX. They are only indirectly bundled on our update-sites and should better be checked out in source (org.eclipse.gef.zest.examples) from our GEF Git repository. In order to have the example plug-in compile properly, all other required GEF 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.gef.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.gef.zest.examples via the context menu ('Run As' -> 'Java Application').

CustomNodeExample

SimpleExample


Examples.JFace (undeployed)

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

The examples provided by Examples.JFace demonstrate how to use the JFace-API provided by Zest.FX.JFace. They are not deployed on our update-sites and have to checked out in source (org.eclipse.gef.zest.examples.jface) from our GEF Git repository. In order to have the example plug-in compile properly, all other required GEF 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.gef.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.gef.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.

JFaceCustomNodeExample

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

JFaceEdgeDecorationExample

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

JFaceEdgeRouterExample

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

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.

JFaceNestingExample

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

JFaceSimpleExample

The JFaceSimpleExample demonstrates the basic usage of a ZestContentViewer.

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.