[Biojava-l] New FeatureRenderers and demo

Keith James kdj@sanger.ac.uk
10 Jun 2001 20:22:36 +0100


I've added demos/seqviewer/BeadDemo.java which shows some of the new
renderers in action (try it on demos/files/AL121903.embl). The
FeatureRenders allow multiple shapes/colours on a single row by
delegation through FeatureFilters. They can also emulate a
MultiLineRenderer by means of a settable Y-axis displacement.

I've tried to tweak performance with some caching and checking of the
visible area before rendering, but it's still a first version and
needs some work. I'll be adding some more shapes (currently there's
rectangle, round-rectangle and ellipse).

In the demo you may notice features vanishing if entirely within 50
pixels of the right edge of the SequencePanel. This seems to be due to
arbitrary 50 pixel offset in SequencePanel interfering with the use of
the rectangle returned by sequencePanel.getVisibleRect(). The renderer
thinks they are outside the visible area and skips over them.

David, can we discuss alternatives to moving the graphics origin to
fix the floating point rounding errors for very long sequences? Or if
anyone else has any ideas?

Keith

-- 

-= Keith James - kdj@sanger.ac.uk - http://www.sanger.ac.uk/Users/kdj =-
The Sanger Centre, Wellcome Trust Genome Campus, Hinxton, Cambs CB10 1SA