[Biojava-dev] SequencePannel fixed?
Keith James
kdj@sanger.ac.uk
16 Oct 2002 21:45:22 +0100
>>>>> "Matthew" == Matthew Pocock <matthew_pocock@yahoo.co.uk> writes:
Matthew> Hi, I've had an attempt at cleaning up the offset
Matthew> heuristics in SequencePannel. In my tests, viewing all
Matthew> allong chrom 1 in the das browser, all the glyphs look
Matthew> right & the mouse functionality seems to work. But, I'm
Matthew> aware we've been stung by this code before, so could some
Matthew> of you that have locked hornes before take it for a spin
Matthew> again and check that your favorite artifacts are all
Matthew> missing? I'm not actualy sure that I've done anything
Matthew> that wasn't being done before, but there are now fewer
Matthew> lines of code ;-)
Cool. One thing which needs fixing is that SequencePanel is not
honouring setOpaque() or setting of background colours. I'm getting
nasty redraw artefacts with Sun Linux JDK 1.4+ in its current
"transparent" state.
As is subclasses JComponent it needs to paint its own background i.e.
if (isOpaque())
{
g2.setPaint(getBackground());
g2.fillRect(0, 0, getWidth(), getHeight());
}
Also it doesn't look like it's taking into account insets so it might
have problems with Swing borders.
I'll check this tomorrow and patch it if necessary.
cheers,
Keith
--
- Keith James <kdj@sanger.ac.uk> bioinformatics programming support -
- Pathogen Sequencing Unit, The Wellcome Trust Sanger Institute, UK -