Recommend this page to a friend! |
Download .zip |
Info | View files (228) | Download .zip | Reputation | Support forum (1) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2011-11-15 (4 years ago) | Not yet rated by the users | Total: 707 This week: 1 | All time: 4,464 This week: 1,047 |
Version | License | PHP version | Categories | |||
reingold-tilford 1.0 | BSD License | 5.3 | Algorithms, PHP 5, Graphics |
Description | Author | ||||||||||||||||
This package can render tree structures in several image formats. Innovation Award
|
|
README ====== What is ReingoldTilford? ------------------------ ReingoldTilford is a collection of classes that are capable of visualising any tree-like structure or taxonomy in a number of image formats. Features -------- ReingoldTilford supports the following: * implements the Reingold-Tilford tree drawing algorithm, a liner time (O(n)) algorithm, in pure PHP * the core algorithm calculates a layout of a n-ary tree-like structure, with which a visualisation of the tree can be created, assuring the following aesthetic criteria: ** obviously, hierarchically and planar connected with straight edges ** the parent is positioned in the middle above its children ** isomorphic subtrees will have the same layout ** drawings of isomorphic subtrees are symmetric with respect to reflection ** in practise, drawings need only a with which is very close to the minimum, or even only the minimal width * an additional set of classes can export this layout to various formats, e.g. plain HTML, SVG, as well as any format supported by gdlib or Imagick * the layout and visualisation is highly customizable (shape style, edge style, colours, borders, ports, etc.) * the package also contains classes to calculate the widths and height of a string of a given font family and size, needed for plotting of node labels etc. * supporting custom tree-structures is just a matter of creating one class that implements the according interface (ReingoldTilford/Models/ITreeModel) * when implementing this appropriate model/adapter, classes and libraries that are not available in source form can be made exportable (e.g. PHPs internal DOMNode class, as seen in the examples) * supporting new formats (like HTML 5 canvas, PDF) is just a matter of creating one class that implements the according interface (Utils/Graphics2D/DrawingPanes/IDrawingPane) * supporting new shapes (e.g. Triangles as shapes for tree nodes) is just a matter of creating one class that extends the according abstract class (Utils/Graphics2D/Shapes/Shape) * due to the fact that it supports exporting to DOM documents (HTML, SVG), dynamic manipulation of both the visualized tree as well as the actual data structure is possible with ease * data structures which are no trees but "almost-tree" can be exported first exporting a tree, then adding the extra edges in a post-processing step * many more core features* * despite not being optimized for speed of execution (but more for ease of extensibility), the package is capable of exporting structures with around 1000 nodes in far less than one second (Intel Pentium T9300 Mobile processor, 4GB RAM, PHP 5.3.8 with Windows CLI), the layout calculation (excluding plotting) for random trees with 100.000 nodes takes around 30 seconds on a AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ with PHP 5.3.2-1ubuntu4.9 with Suhosin-Patch (cli) on Ubuntu 10.10 Requirements ------------ ReingoldTilford requires the following: * PHP 5.3.X, due to namespace support * PHP DOM extension (optional, needed fro HTML and SVG export) * PHP GD Graphics Library (optional, needed for GIF/JPG/PNG export with php_gd2 extension) * PHP ImageMagick (optional, needed for export with php_imagick extension) Installation ------------ Extract the files to any path in your web root directory. How to use ReingoldTilford? ------------------- Point your web browser to the examples in the bin folder: Visualisation of the directory structure of this package - http://localhost/ReingoldTilford/bin/example_directory_tree.php Visualisation of the DOM structure of http://www.phpclasses.org/ (or any other website if you customize the example) - http://localhost/ReingoldTilford/bin/example_DOM.php |
Files |
File | Role | Description | ||
---|---|---|---|---|
app (1 file) | ||||
bin (4 files) | ||||
docs (64 files, 3 directories) | ||||
src (2 directories) | ||||
LICENSE.txt | Lic. | License text | ||
README.txt | Doc. | Documentation | ||
sample_output_DOM.svg | Doc. | sample output of bin/example_DOM.php | ||
sample_output_filesystem.html | Example | sample output of bin/example_directory_tree_dynamic.php |
Files | / | bin |
File | Role | Description |
---|---|---|
example_directory_tree.php | Example | example script that plots the directory structure of the installation |
example_directory_tree_dynamic.php | Example | example with some dynamic CSS goodies |
example_DOM.php | Example | example script that plots the DOM node structure of a given HTML document. |
FontManagerServiceEndpoint.php | Example | AJAX service endpoint |
Files | / | docs |
Files | / | docs | / | css |
File | Role | Description | ||
---|---|---|---|---|
black-tie (1 file, 1 directory) | ||||
docblox (1 file, 1 directory) | ||||
images (16 files) | ||||
api-content.css | Data | Auxiliary data | ||
default.css | Data | Auxiliary data | ||
jquery-ui.css | Data | Auxiliary data | ||
jquery.treeview.css | Data | Auxiliary data | ||
navigation.css | Data | Auxiliary data | ||
sen.full.min.css | Data | Auxiliary data | ||
theme.css | Data | Auxiliary data |
Files | / | docs | / | css | / | black-tie |
File | Role | Description | ||
---|---|---|---|---|
images (16 files) | ||||
jquery-ui-1.8.2.custom.css | Data | Auxiliary data |
Files | / | docs | / | css | / | black-tie | / | images |
File | Role | Description |
---|---|---|
ui-anim_basic_16x16.gif | Icon | Icon image |
ui-bg_diagonals-thick_8_333333_40x40.png | Icon | Icon image |
ui-bg_flat_65_ffffff_40x100.png | Icon | Icon image |
ui-bg_glass_40_111111_1x400.png | Icon | Icon image |
ui-bg_glass_55_1c1c1c_1x400.png | Icon | Icon image |
ui-bg_highlight-ha...00_f9f9f9_1x100.png | Icon | Icon image |
ui-bg_highlight-hard_40_aaaaaa_1x100.png | Icon | Icon image |
ui-bg_highlight-soft_50_aaaaaa_1x100.png | Icon | Icon image |
ui-bg_inset-hard_45_cd0a0a_1x100.png | Icon | Icon image |
ui-bg_inset-hard_55_ffeb80_1x100.png | Icon | Icon image |
ui-icons_222222_256x240.png | Icon | Icon image |
ui-icons_4ca300_256x240.png | Icon | Icon image |
ui-icons_bbbbbb_256x240.png | Icon | Icon image |
ui-icons_ededed_256x240.png | Icon | Icon image |
ui-icons_ffcf29_256x240.png | Icon | Icon image |
ui-icons_ffffff_256x240.png | Icon | Icon image |
Files | / | docs | / | css | / | docblox |
File | Role | Description | ||
---|---|---|---|---|
images (15 files, 1 directory) | ||||
jquery-ui-1.8.16.custom.css | Data | Auxiliary data |
Files | / | docs | / | css | / | docblox | / | images |
File | Role | Description | ||
---|---|---|---|---|
icons (8 files) | ||||
ui-bg_glass_55_1c1c1c_1x400.png | Icon | Icon image | ||
ui-bg_hexagon_15_232325_12x10.png | Icon | Icon image | ||
ui-bg_highlight-ha...00_f9f9f9_1x100.png | Icon | Icon image | ||
ui-bg_highlight-hard_40_232325_1x100.png | Icon | Icon image | ||
ui-bg_highlight-hard_65_232325_1x100.png | Icon | Icon image | ||
ui-bg_highlight-soft_40_aaaaaa_1x100.png | Icon | Icon image | ||
ui-bg_highlight-soft_50_aaaaaa_1x100.png | Icon | Icon image | ||
ui-bg_inset-hard_45_cd0a0a_1x100.png | Icon | Icon image | ||
ui-bg_inset-hard_55_ffeb80_1x100.png | Icon | Icon image | ||
ui-icons_222222_256x240.png | Icon | Icon image | ||
ui-icons_4ca300_256x240.png | Icon | Icon image | ||
ui-icons_bbbbbb_256x240.png | Icon | Icon image | ||
ui-icons_ededed_256x240.png | Icon | Icon image | ||
ui-icons_ffcf29_256x240.png | Icon | Icon image | ||
ui-icons_ffffff_256x240.png | Icon | Icon image |
Files | / | docs | / | css | / | docblox | / | images | / | icons |
File | Role | Description |
---|---|---|
chart.png | Icon | Icon image |
chart15x12.png | Icon | Icon image |
dashboard.png | Icon | Icon image |
files.png | Icon | Icon image |
namespaces.png | Icon | Icon image |
packages.png | Icon | Icon image |
reports.png | Icon | Icon image |
reports9x12.png | Icon | Icon image |
Files | / | docs | / | css | / | images |
File | Role | Description |
---|---|---|
ajax-loader.gif | Icon | Icon image |
file.gif | Icon | Icon image |
folder-closed.gif | Icon | Icon image |
folder.gif | Icon | Icon image |
minus.gif | Icon | Icon image |
plus.gif | Icon | Icon image |
treeview-black-line.gif | Data | Auxiliary data |
treeview-black.gif | Icon | Icon image |
treeview-default-line.gif | Data | Auxiliary data |
treeview-default.gif | Icon | Icon image |
treeview-famfamfam-line.gif | Icon | Icon image |
treeview-famfamfam.gif | Icon | Icon image |
treeview-gray-line.gif | Data | Auxiliary data |
treeview-gray.gif | Icon | Icon image |
treeview-red-line.gif | Data | Auxiliary data |
treeview-red.gif | Icon | Icon image |
Files | / | docs | / | images |
File | Role | Description | ||
---|---|---|---|---|
icons (14 files) | ||||
arrow_down.gif | Icon | Icon image | ||
arrow_right.gif | Icon | Icon image | ||
background.png | Data | Auxiliary data | ||
clear_left.png | Icon | Icon image | ||
collapse_all.png | Icon | Icon image | ||
expand_all.png | Icon | Icon image | ||
file.gif | Icon | Icon image | ||
folder.gif | Icon | Icon image | ||
icon48x48.png | Icon | Icon image | ||
logo.png | Icon | Icon image | ||
logo_old.png | Icon | Icon image | ||
menu-background.png | Icon | Icon image | ||
search.gif | Icon | Icon image | ||
top-background.png | Icon | Icon image | ||
top-stopper.png | Icon | Icon image | ||
top.png | Data | Auxiliary data |
Files | / | docs | / | images | / | icons |
File | Role | Description |
---|---|---|
arrow_down.png | Icon | Icon image |
arrow_right.png | Icon | Icon image |
class.png | Icon | Icon image |
constant.png | Icon | Icon image |
file-php.png | Icon | Icon image |
function.png | Icon | Icon image |
interface.png | Icon | Icon image |
method.png | Icon | Icon image |
ok.png | Icon | Icon image |
property.png | Icon | Icon image |
variable.png | Icon | Icon image |
visibility_private.png | Icon | Icon image |
visibility_protected.png | Icon | Icon image |
visibility_public.png | Icon | Icon image |
Files | / | docs | / | js |
File | Role | Description |
---|---|---|
jquery-1.4.2.min.js | Data | Auxiliary data |
jquery-ui-1.8.2.custom.min.js | Data | Auxiliary data |
jquery.cookie.js | Data | Auxiliary data |
jquery.splitter.js | Data | Auxiliary data |
jquery.treeview.js | Data | Auxiliary data |
menu.js | Data | Auxiliary data |
sidebar.js | Data | Auxiliary data |
SVGPan.js | Data | Auxiliary data |
Files | / | src | / | ReingoldTilford |
File | Role | Description | ||
---|---|---|---|---|
Algorithms (2 files) | ||||
Models (4 files) | ||||
Plotters (1 file) | ||||
Styles (1 file) |
Files | / | src | / | ReingoldTilford | / | Algorithms |
File | Role | Description |
---|---|---|
Layout.inc | Class | class that encapsulates the layout, i.e., the coordinates of nodes of a tree |
ReingoldTilfordAlgorithm.inc | Class | main class implementing the Reingold-Tilford algorithm |
Files | / | src | / | ReingoldTilford | / | Models |
File | Role | Description |
---|---|---|
DomTreeModel.inc | Class | TreeModel implementation for the PHP's DOMNode class |
FSTreeModel.inc | Class | ITreeModel implementation for the FileSystemObject classes |
ITreeModel.inc | Class | interface that defines the basic methods that are neccessary for a data structure to be processed by the Reingold-Tilford tree drawing algorithm |
TreeModel.inc | Class | an abstract ITreeModel implementation, implementing the most basic elements |
Files | / | src | / | ReingoldTilford | / | Plotters |
File | Role | Description |
---|---|---|
Plotter.inc | Class | class that can plot the layout returned by the Reingold-Tilford tree drawing algorithm |
Files | / | src | / | ReingoldTilford | / | Styles |
File | Role | Description |
---|---|---|
TreeStyle.inc | Class | class that implements a style for trees |
Files | / | src | / | Utils | / | Autoload |
File | Role | Description |
---|---|---|
Autoloader.inc | Class | exception which is thrown when the autoloader is unable to locate a source file |
SourceFileNotFoundException.inc | Class | the just-in-time class autoloader of this package |
Files | / | src | / | Utils | / | Color |
File | Role | Description |
---|---|---|
Color.inc | Class | This class serves as abstract class for any color. |
RgbColor.inc | Class | This class encapsulates an RGB color. |
Files | / | src | / | Utils | / | File |
File | Role | Description |
---|---|---|
Directory.inc | Class | This class represents a directory in the file system. It contains a collection of children referencing files and other directories. |
File.inc | Class | This class represents a file in the file system. |
FileSystemObject.inc | Class | This class represents an abstract object in the file system. |
IFileSystemObject.inc | Class | This interface defines a type for representing an abstract object in the file system. |
Files | / | src | / | Utils | / | Font |
File | Role | Description | ||
---|---|---|---|---|
FontMetricServices (3 files) | ||||
FontManager.inc | Class | This class is responsible for managing font metrics. | ||
FontMetric.inc | Class | This class encapsulates font metrics, i.e. for a given font family and font size given as text stlye. | ||
fontMetrics.tpl | Data | Auxiliary data |
Files | / | src | / | Utils | / | Font | / | FontMetricServices |
File | Role | Description |
---|---|---|
FontMetricService.inc | Class | This class represents an abstract front metric service. |
FontMetricServiceFactory.inc | Class | This class acts as factory for creating font metric services. |
FontMetricWebServerService.inc | Class | This class implements a font metric calculation service for use when this package is invoked through the browser. |
Files | / | src | / | Utils | / | Geom |
File | Role | Description |
---|---|---|
Dimension.inc | Class | This class encapsulates the width and height of an object in the two-dimensional space, e.g. a rectangle or an ellipse. |
Point.inc | Class | This class represents a point in the two-dimensional space. |
Files | / | src | / | Utils | / | Graphics2D |
File | Role | Description | ||
---|---|---|---|---|
DrawingPanes (8 files) | ||||
Shapes (12 files, 1 directory) |
Files | / | src | / | Utils | / | Graphics2D | / | DrawingPanes |
File | Role | Description |
---|---|---|
DomDrawingPane.inc | Class | This class implements an abstract drawing pane for DOM output. |
DrawingPane.inc | Class | This class implements an abstract drawing pane. |
GdLibDrawingPane.inc | Class | This class implements a drawing pane for the GD PHP extension. |
HtmlDrawingPane.inc | Class | This class implements a drawing pane for HTML map output. |
IDrawingPane.inc | Class | This interface defines a common super type for drawing panes. |
ImageDrawingPane.inc | Class | This class implements an abstract drawing pane for binary image output. |
ImagickDrawingPane.inc | Class | This class implements a drawing pane for Imagick PHP extension. |
SvgDrawingPane.inc | Class | This class implements a drawing pane for SVG output. |
Files | / | src | / | Utils | / | Graphics2D | / | Shapes |
File | Role | Description | ||
---|---|---|---|---|
Styles (6 files) | ||||
DirectEdge.inc | Class | This class represents a direct edge. | ||
Edge.inc | Class | This class represents an abstract edge shape. | ||
EdgeFactory.inc | Class | This class acts as factory for graphical edge elements. | ||
Ellipse.inc | Class | This class represents an ellipse shape. | ||
IShape.inc | Class | This interface defines a type for generic shapes. | ||
PolyEdge.inc | Class | This class represents a poly-edge shape. | ||
Rectangle.inc | Class | This class represents a rectangle shape. | ||
Shape.inc | Class | This class represents an abstract shape. | ||
ShapeFactory.inc | Class | This class acts as factory for graphical shape elements. | ||
Star.inc | Class | This class represents a star shape. | ||
Text.inc | Class | This class represents a text shape. | ||
TextFactory.inc | Class | This class acts as factory for graphical text elements. |
Files | / | src | / | Utils | / | Graphics2D | / | Shapes | / | Styles |
File | Role | Description |
---|---|---|
BorderStyle.inc | Class | This class implements a style for borders. |
EdgeStyle.inc | Class | This class implements a style for edges. |
IStyle.inc | Class | This interface defines a type for styles. |
LineStyle.inc | Class | This class implements an abstract style for lines. |
ShapeStyle.inc | Class | This class implements a style for shapes. |
TextStyle.inc | Class | This class implements a style for texts. |
Files | / | src | / | Utils | / | Logging |
File | Role | Description |
---|---|---|
FileLogger.inc | Class | class acts as a logger which prints to a file |
Logger.inc | Class | class acts as a logger which prints to the standard output |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
99% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.