Chapter 7. Layout

Table of Contents

Tutorial At A Glance
Running The Tutorial Example
LayoutController
Layout Context (Type Configuration)
Summary

This tutorial provides Java Application Programmers exposure to an important and convenient feature of the Tensegrity Graph Framework. Here we give you a design and programming introduction to layouts - algorithms which can be applied to visual graphs so that they may be automatically arranged for you.

Without a doubt, automatic layout functionality is a time-saving feature of this graph framework. Without it, you would spend countless hours manually arranging your graphs, only to find yourself repeating the mundane task whenever you insert or delete a new element.

Tutorial At A Glance

The table below gives you some important information about this tutorial.

Table 7.1. Tutorial Aspects

Tutorial AspectTutorial Description
Approximate Duration10 Minutes
Expected Outcome An application sporting a menu that, when clicked, applies a particular layout algorithm to a GraphView. This example gives the Java Application Programmer an initial exposure to different layout components that can be easily applied to visual graphs.
Source FilesThe tutorial examples come with two source packages containing the java and configuration files needed to compile and run them. These are “com.tensegrity.firststeps.layout” and “com.tensegrity.firststeps.swt.layout” respectively for the AWT/Swing-based and SWT-based examples.
Creating FilesNot applicable in this tutorial
Modifying FilesNot applicable in this tutorial