Part I. Creating and Modeling Graphs

In the following chapters you will be introduced to the core components of the Tensegrity Graph Framework. Here we provide you with a general description of the basic concepts found within the framework domain.

A graph visualization typically consists of a model that maintains the logical structure of a graph as well as a view that defines the visual representation of that graph model. The Tensegrity Graph Framework implements the MVC pattern by separating these two responsibilities into separate components. This approach allows you to easily maintain different views for identical models without having to maintain multiple instances of those models.

The Tensgrity Graph Framework supports complex visual representations of nodes and edges. Composite objects holding Primitive lines, rectangles and ellipses allow you to construct complex visualizations for any type of object. Composite objects are typically used to visualize graph nodes and edges.

An Element is a named repository object that is defined in an XML file and aggregates a Composite, formatting Style and optional Rule. Style objects are used to define line, fill and font formatting specifications that can be reused while Rule objects define the interaction constraints that affect users when constructing visual graphs.

Once a Graph, VisualGraphView and a Composite have been defined, layout algorithms are available that help you arrange visual items in predefined ways. There are several layout algorithms available which can be customized using parameters.

Often it is necessary to attach data to nodes and edges in order to provide and manage custom information. This can be achieved by defining and applying user-defined typed attributes which can be value-constrained.

Below is a short overview of this manual part's chapters.

  • Chapter 1 - Graph Basics

    This chapter explains the concepts and construction techniques of Graph model objects, nodes, edges and subgraphs. VisualGraphView (view) concepts, including generic visual representations for nodes and edges, is also explained. Finally, we have a look at graph controllers.

  • Chapter 2 - Composites

    This chapter introduces the Primitive interface, which is the basis for creating complex Composite shapes. A short overview on how coordinate systems and scales are handled within the Tensegrity Graph Framework is also provided that define how Composite objects are placed within the view and nested inside a CompositeGroup.

  • Chapter 3 - Elements

    This chapter provides information on how you can manipulate XML definition files to create Repository Elements. Styles and formatting options for Composite objects are explained as well as how they may be applied. Finally, Element Rules are discussed.

  • Chapter 4 - Layout

    The different layout algorithms and their options are explained in this chapter. You will learn which layout algorithms are available to you, which results they provide and how their parameters influence the arrangement of visual nodes and edges.

  • Chapter 5 - Attributes

    To manage custom data within your Graph application, you may attach Attribute objects to your model objects and even group them inside attribute sets. Value assignments may be restricted and validated by assigning a Constraint object to each Attribute as well.

Table of Contents

1. Graph Basics
Graphs
Nodes and Edges
Directed And Undirected Graphs
Graph Types and Terms
Graph Visualization
Model View Controller (MVC)
Single Model - Multiple Views
The MVC Pattern
Notifying views about model changes
Graph Model
Interface GraphObject
Interface Node
Interface Edge
Interface Port
Interface GraphObjectContainer
Interface Graph
Factories
Creating a Graph Model
Graph View
VisualGraph Interfaces and Classes
Interface VisualGraphObject
Interface VisualNode
Interface VisualEdge
Interface VisualPort
Interface VisualGraphObjectContainer
Interface VisualGraphView
Interface GraphViewFactory
Creating a VisualGraph
Adding and Removing View Objects
Graph Controllers
Info Objects
Subgraphs
Graph Abstraction Layer
GraphObject IDs
Modeling Rules
GraphObjectRule
NodeRule
EdgeRule
Graph Rule
Rule Registry
Relations and General Use
Modelling Handlers
Handlers and Handler Registries
Summary
2. Composites
Scales
Interface Scale
Coordinate Systems
Interface CoordinateSystem
Pooling
Primitives
Interface Primitive
Primitive Implementations
Polygon2D
Composite Interfaces
BaseComposite Interface
Composite
CompositeLine
CompositeView
Creating a Simple Composite
Composite Groups
BaseCompositeContainer
CompositeGroup
CompositeTable
3. Elements
Introduction
Geometries
GeometryItem
GeometryDescriptorItem
Interface GeometryDescriptor
Definition of a polygon
Example for a GeometryDescriptor definition
Styles
Formats
StyleItem
StyleDescriptorItem
StyleDescriptor
Rules
GraphObjectRule
NodeRule
EdgeRule
GraphRule
Elements
Creating an Element
Tutorial
Separate into basic shapes
Define GeometryItem
Define the GeometryDescriptor
Define the Style Items
Create the StyleDescriptor
Combine Style and Geometry
4. Layout
Overview
High-Level Layout Controlling
LayoutController
Predefined Layout Controllers
Custom LayoutController
Performing A Layout On A VisualGraph
Layout Component Interfaces
Interface Layout
Interface NodeLayout
Interface EdgeLayout
Interface Layoutable
Interface LayoutableNode
Interface LayoutableEdge
Custom Layout Class Implementation
Layout Implementation Classes
Hierarchical Layout
Energy Layout
Circular Layout
Tree Layout
Orgchart Layout
Edge Layout
5. Attributes
Attribute Definition
Attribute Definition
AttributeType
Restrictable Attributes
Cloning an Attribute
Attribute Collections
The Attribute Package
Nesting An AttributeCollection
Traversing Attribute Trees
AttributeCollection Searching And Removing
Restrictions For Attribute Collections
Attribute-Related Exceptions
Default Attribute Implementation
Mutable And Immutable Attributes
Constructing an Attribute via Factory
Constraints
The Purpose Of Constraints
Restricting Values And Types
Adding New Custom Constraints
Restrictable Interface
Summary