This tutorial is a step-by-step introduction to the concepts and main features of the yFiles for JavaFX diagramming library. It is intended for developers who want to get started with the library in an effective way.
This tutorial demonstrates both basic concepts as well as how to build a diagramming application that supports custom styles, full user interaction, Undo/Redo, clipboard, I/O, grouping and folding.
If you are new to the yFiles for JavaFX diagramming library, we recommend to start by going through the projects in this tutorial one by one. To make full use of the tutorial, we also recommend to review and possibly modify the source code for each sample project.
The best way to run a tutorial step is from within your preferred IDE. Set the <yFiles-for-JavaFX>/tutorials/01 Getting Started/src folder as source folder and add the yFiles library (yfiles-for-javafx.jar) to your references. Each step can be started by running or debugging the SampleApplication class in the appropriate package.
| Name | Description |
|---|---|
| Step 01: Creating the View | This step introduces class GraphControl, which is the central UI element for working with graphs. |
| Step 02: Creating Graph Elements | This step shows how to create the basic graph elements. |
| Step 03: Managing the Viewport | This step shows how to work with the Viewport. |
| Step 04: How to influence visual appearance | This step shows how to configure the visual appearance of graph elements using styles. |
| Step 05: Placing Labels | This step shows how to control label placement with the help of so called label model parameters. |
| Step 06: Basic Interaction | This step shows the default interaction possibilities that are provided by class GraphEditorInputMode. |
| Step 07: Undo and Clipboard Support | This step shows how to use undo and clipboard functionality. |
| Step 08: Using GraphML for Loading and Saving | This step shows how to use GraphML I/O functionality. |
| Step 09: Customizing Behavior | This step presents the ILookup interface. |
| Step 10: Grouped Graphs | This step shows how to enable support for grouped (or hierarchically organized) graphs. |
| Step 11: Folding | This step shows how to enable collapse/expand functionality for grouped graphs. |
| Step 12: Binding Data to Graph Elements | This step shows how to bind data to graph elements. |
| Step 13: Custom Data Export to GraphML | This step shows how to read and write data that is bound to graph elements to/from a graphml file. |
| Step 14: Automatic Graph Layout | This step shows how to use the layout algorithms in yFiles for JavaFX to automatically place the graph elements. |
| Step 15: Snapping | This step shows how to enable snapping functionality for graph elements. |
| Step 16: Grid Snapping | This step shows how to enable grid snapping for graph elements. |
| Step 16: Orthogonal Edges | This step shows how to enable orthogonal edge creation. |
Copyright yWorks GmbH, 2015. All rights reserved.