RSS

Search Engine

Thursday, August 12, 2010

Eclipse Zest

1.1. Overview

Eclipse Zest is a visualization toolkit for graphs. It is based on SWT / Draw2D. Zest supports the viewer concept from JFace and therefore allows to separate the model from the graphical representation of the model. This article assumes that you are already familiar with Eclipse RCP Tutorials .

1.2. Components

Eclipse Zest has the following components:

  • GraphNode - Node in the graph with the properties

  • GraphConnections - Arrow / Edge of the graph which connections to two nodes

  • GraphContainer - Use for a graph within a graph

  • Graph - holds the other elements (nodes, connections, container)

1.3. Layout Manager

Eclipse Zest provides graph layout managers. A graph layout manager determines how the nodes (and the arrows) of a graph are arranged on the screen. The following layout managers are provided:

Table 1. Layout Manager

Layout Manager Description
TreeLayoutAlgorithmGraph is displayed in the form of a vertical tree
HorizontalTreeLayoutAlgorithmSimilar to TreeLayoutAlgorithm but layout is horizontal
RadialLayoutAlgorithmRoot is in the center, the others nodes are placed around this node
GridLayoutAlgorithm
SpringLayoutAlgorithmLayout the graph so that all connections should have approx. the same length and that the edges overlap minimal
HorizontalShiftMoves overlapping nodes to the right
CompositeLayoutAlgorithmCombines other layout algorithms, for example HorizontalShift can be the second layout algorithm to move nodes which were still overlapping if another algorithm is used

1.4. Filter

You can also define filters (org.eclipse.zest.layouts.Filter) on the layout managers via the method setFilter(filter). This defines which nodes and connections should be displayed. The filter receives an LayoutItem, the actual graph element can be received with the method getGraphData().

0 comments:

Post a Comment