Mercurial > projects > dwt-addons
comparison dwtx/draw2d/graph/CompoundDirectedGraph.d @ 98:95307ad235d9
Added Draw2d code, still work in progress
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 03 Aug 2008 00:52:14 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
96:b492ba44e44d | 98:95307ad235d9 |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2003, 2005 IBM Corporation and others. | |
3 * All rights reserved. This program and the accompanying materials | |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
7 * | |
8 * Contributors: | |
9 * IBM Corporation - initial API and implementation | |
10 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 *******************************************************************************/ | |
13 module dwtx.draw2d.graph.CompoundDirectedGraph; | |
14 | |
15 import dwt.dwthelper.utils; | |
16 import dwtx.draw2d.graph.DirectedGraph; | |
17 import dwtx.draw2d.graph.NodeList; | |
18 import dwtx.draw2d.graph.EdgeList; | |
19 | |
20 /** | |
21 * A <code>DirectedGraph</code> whose Nodes may be compound {@link Subgraph}s, which may | |
22 * contain other nodes. Any node in the graph may be parented by one subgraph. Since | |
23 * subgraphs are nodes, the source or target end of an {@link Edge} may be a subgraph. | |
24 * For additional restrictions, refer to the JavaDoc for the layout algorithm being used. | |
25 * <P> | |
26 * A CompoundDirectedGraph is passed to a graph layout, which will position all of the | |
27 * nodes, subgraphs, and edges in that graph. This class serves as the data structure for | |
28 * a layout algorithm. | |
29 * | |
30 * @author Randy Hudson | |
31 * @since 2.1.2 | |
32 */ | |
33 public class CompoundDirectedGraph : DirectedGraph { | |
34 | |
35 /** | |
36 * For internal use only. | |
37 */ | |
38 public NodeList subgraphs; | |
39 | |
40 /** | |
41 * For internal use only. | |
42 */ | |
43 public EdgeList containment; | |
44 | |
45 public this(){ | |
46 subgraphs = new NodeList(); | |
47 containment = new EdgeList(); | |
48 } | |
49 | |
50 } |