[Biojava-l] leader and trailer in Renderers

David Huen smh1008@cus.cam.ac.uk
Mon, 4 Mar 2002 14:06:36 +0000 (GMT)


I've been going thru' the SequencePanel code to document it a bit more and
I am puzzled over the intent behind the leader and trailer allocations in
this code.

If I understand the SequencePanel source correctly, each renderer tells
SequencePanel thru' getMinimumLeader and getMinimumTrailer the number of
pixels to set aside for these.  SequencePanel uses these on a per-renderer
basis to append the number of pixels before and after the space required
to render the sequence and aligns the left edge against the right edge of
the leading Border allocation.

If this is the case, the moment we start allocating leaders and trailers
(all renderers use sero so far), we might have sequence renderings out of
kilter, wouldn't we?  Shouldn't the allocation be per-panel rather
per-renderer?  If we use per-panel allocations, the renderers will need to
recover from SequencePanel the actual leader/trailer allocations.  Have I
understood the code correctly?

What was the original intent for these allocations?  Labels?

Thanks,
David Huen