Graph Layout > Getting Started with Graph Layout > Basic Steps for Using Layout Algorithms: A Summary
 
Basic Steps for Using Layout Algorithms: A Summary
To use the layout algorithms provided by the Graph Layout package of Rogue Wave Views, you will usually perform the following steps:
1. Create a grapher object (IlvGrapher) and fill it with nodes and links.
2. Create an instance of the layout algorithm (any subclass of IlvGraphLayout). For details, see Instantiating a Subclass of IlvGraphLayout.
3. Attach the grapher to the layout instance. See Attaching a Grapher.
4. Modify the default settings for the layout parameters, if needed. See Layout Parameters in IlvGraphLayout.
5. Call the performLayout method. See Performing a Layout.
6. Read and display information from the layout report. The layout report is an object in which the layout algorithm stores information about its behavior. For details, see Using a Layout Report.
7. When the layout instance is no longer needed, detach the grapher from the layout instance. See Detaching a Grapher.
A sample application that illustrates these steps is provided with the release. The section Sample Application tells you how to compile and run the application and provides the sample code. You can use this application as an example to get started with the layout algorithms of the Graph Layout package.

Version 6.0
Copyright © 2015, Rogue Wave Software, Inc. All Rights Reserved.