0
|
1 package Bio::Graphics::Glyph::group;
|
|
2
|
|
3 use strict;
|
|
4 use vars '@ISA';
|
|
5 use Bio::Graphics::Glyph::segmented_keyglyph;
|
|
6 @ISA = 'Bio::Graphics::Glyph::segmented_keyglyph';
|
|
7
|
|
8 # group sets connector to 'dashed'
|
|
9 sub connector {
|
|
10 my $self = shift;
|
|
11 my $super = $self->SUPER::connector(@_);
|
|
12 return $super if $self->all_callbacks;
|
|
13 return 'dashed' unless defined($super) && ($super eq 'none' or !$super);
|
|
14 }
|
|
15
|
|
16 # we don't label group (yet)
|
|
17 sub label { 0 }
|
|
18
|
|
19 sub new {
|
|
20 my $self = shift->SUPER::new(@_);
|
|
21 # reset our parts to level zero
|
|
22 foreach (@{$self->{parts}}) {
|
|
23 $_->{level} = 0;
|
|
24 }
|
|
25 $self;
|
|
26 }
|
|
27
|
|
28 # don't allow simple bumping in groups -- it looks terrible...
|
|
29 sub bump {
|
|
30 my $bump = shift->SUPER::bump(@_);
|
|
31 return unless defined $bump;
|
|
32 return 1 if $bump > 1;
|
|
33 return -1 if $bump < -1;
|
|
34 return $bump;
|
|
35 }
|
|
36
|
|
37 1;
|
|
38
|
|
39 __END__
|
|
40
|
|
41 =head1 NAME
|
|
42
|
|
43 Bio::Graphics::Glyph::group - The "group" glyph
|
|
44
|
|
45 =head1 SYNOPSIS
|
|
46
|
|
47 See L<Bio::Graphics::Panel> and L<Bio::Graphics::Glyph>.
|
|
48
|
|
49 =head1 DESCRIPTION
|
|
50
|
|
51 This glyph is used internally by Bio::Graphics::Panel for laying out
|
|
52 groups of glyphs that move in concert. It should not be used
|
|
53 explicitly.
|
|
54
|
|
55 =head1 BUGS
|
|
56
|
|
57 Please report them.
|
|
58
|
|
59 =head1 SEE ALSO
|
|
60
|
|
61 L<Ace::Sequence>, L<Ace::Sequence::Feature>, L<Bio::Graphics::Panel>,
|
|
62 L<Bio::Graphics::Track>, L<Bio::Graphics::Glyph::anchored_arrow>,
|
|
63 L<Bio::Graphics::Glyph::arrow>,
|
|
64 L<Bio::Graphics::Glyph::box>,
|
|
65 L<Bio::Graphics::Glyph::primers>,
|
|
66 L<Bio::Graphics::Glyph::segments>,
|
|
67 L<Bio::Graphics::Glyph::toomany>,
|
|
68 L<Bio::Graphics::Glyph::transcript>,
|
|
69
|
|
70 =head1 AUTHOR
|
|
71
|
|
72 Lincoln Stein E<lt>lstein@cshl.orgE<gt>
|
|
73
|
|
74 Copyright (c) 2001 Cold Spring Harbor Laboratory
|
|
75
|
|
76 This library is free software; you can redistribute it and/or modify
|
|
77 it under the same terms as Perl itself. See DISCLAIMER.txt for
|
|
78 disclaimers of warranty.
|
|
79
|
|
80 =cut
|