NAME
Tk::GraphItems::Connector - Display edges of relation-graphs on a Tk::Canvas
SYNOPSIS
require Tk::GraphItems::TextBox;
require Tk::GraphItems::Connector;
my $conn = Tk::GraphItems::Connector->new(
source=>$a_TextBox,
target=>$another_TextBox],
);
$conn->colour('red');
$conn->arrow('both');
$conn->width(2);
$conn->detach;
$conn = undef;
DESCRIPTION
Tk::GraphItems::Connector provides objects to display edges of relation-graphs on a Tk::Canvas widget.
SEE ALSO
Documentation of Tk::GraphItems::TextBox . Example in Tk::GraphItems.pod
METHODS
Tk::GraphItems::Connector supports the following methods:
- new(source=>$a_GraphItems-Node, target=>$a_GraphItems-Node)
-
Create a new Connector instance and display it on the Canvas of 'source' and 'target'.
- colour([$a_Tk_colour])
-
Sets the colour to $a_Tk_colour, if the argument is given. Returns the current colour, if called without an argument.
- arrow('source'|'target'|'none'|'both')
-
Sets the style of the Connectors line-endings. Defaults to 'target'.
- width($line_width)
-
Sets Connectors linewidth in pixels. Defaults to 1.
- detach
-
Detach the Connector instance from its source and target so it can be DESTROYED. - It will however stay 'alive' as long as you hold any references to it. If you do not hold a reference to 'Connector' (you don't have to, unless you want to change it's properties...), it will be DESTROYED when either of its 'source'- or 'target'-nodes is destroyed.
AUTHOR
Christoph Lamprecht, ch.l.ngre@online.de
COPYRIGHT AND LICENSE
Copyright (C) 2006 by Christoph Lamprecht
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.