yFiles for Java Tutorial

This tutorial is intended as a practical guide for programmers who want to incorporate diagramming functionality from the yFiles for Java graph visualization library into their own applications. The tutorial includes examples and lessons that show how to use the features provided by yFiles for Java. Groups of related lessons are organized into "trails."

This tutorial also provides pointers to related demo applications and further information, for example, in the yFiles for Java Developer's Guide or in our Knowledge Base.

Trails Covering the Basics

These first two trails introduce the two basic types of diagramming application, namely the viewer type and the editor type of application. We will, step by step, create a simple sample of each using the yFiles for Java graph visualization library.

Creating a Simple Graph Viewer — This trail shows how to create a simple graph viewer application that uses the yFiles graph view.

Creating a Simple Graph Editor — This trail shows how to create a simple graph editor application that uses the yFiles graph view and additionally provides support for handling user interaction to create and/or change a graph.

In this following trail, the simple viewer type diagramming application is re-used for the purpose of data presentation in further applications we will build.

Getting Data Into the View — Describes different ways how you can get your data into the yFiles graph view, i.e., how to create a yFiles graph structure from your data.

Handling Additional Data for Graph Elements — This trail shows how additional data for graph elements can be conveniently handled. The simple editor type diagramming application is used as a starting point.

Application Functionality-related Trails and Lessons

Adding Tooltips to Graph Elements — This short trail presents how to enable default tooltip presentation for graph elements and shows how you can customize tooltips. Also, a specialized view mode class to enable tooltips is presented.

Enabling Undo/Redo Support — This trail briefly shows how to enhance an editor type application with undo/redo support. Also shown is how to create an example custom undo/redo command.

Enabling Clipboard Support — This trail briefly shows how to enable clipboard support (Cut, Copy, Paste) in an editor type application.