Alzabo-Display-SWF
view release on metacpan or search on metacpan
./Build install
The ./etc folder contains a configuration sample my_conf.yml and
an example script create.pl which receives the name of
an Alzabo schema and generates the corresponding SWF movie
together with an HTML Page that embeddes this movie. To view
the movie you have to get the Flash Player plugin for
your browser from http://www.macromedia.com/.
Additionally the ./etc folder contains several FDB files, which contain
the fonts used for the default configuration and the one in my_conf.yml
AUTHOR
Stefan Baumann <s.baumann@uptime.at>
COPYRIGHT
Copyright (c) 2003 Stefan Baumann for Uptime Systemlösungen GmbH.
All rights reserved. This program is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.
lib/Alzabo/Display/SWF.pm view on Meta::CPAN
name in a table header and the columns following in the body. Primary
and foreign keys are indicated by a small circle in front of the
column name. In the case of a foreign key, moving the mouse over
the indicator displays a line to the indicator(s) of the column(s) it
is related to (in the same or in another table).
In the bottom of the movie there is a label with the name of the Alzabo
schema. Clicking on this label toggles the display of all relations
between tables.
Individual configuration of the colors, fonts and linestyles in the movie
can be done via a YAML configuration file (see SYNOPSIS).
=head1 TODO
=over 4
=item *
Signify cardinality and (in)dependence of relationships.
lib/Alzabo/Display/SWF/Schema.pm view on Meta::CPAN
my %p = @_;
my $self = {};
bless $self, $pkg;
$self->{mov} = new SWF::Movie;
$self->{ars} = Alzabo::Runtime::Schema->load_from_file(name => $p{name});
$self->{cfg} = $p{cfg};
$self->{gvz} = GraphViz->new( qw/
layout neato
no_overlap 1
/,
node => {qw/ shape box fontname Courier /},
graph => {qw/ splines false /, label => $p{name} },
);
return $self;
}
sub create_graph {
my $self = shift;
my $g = $self->{gvz};
my (%fk, %tm);
my @t = $self->{ars}->tables;
( run in 1.424 second using v1.01-cache-2.11-cpan-5735350b133 )