[Biojava-l] SequencePanel changes between 1.3 and 1.4pre1
Mark Southern
msouthern at exsar.com
Tue Jan 11 09:48:36 EST 2005
I've just started looking at 1.4pre1 (sorry to take so long!).
I am using SequencePanel's to view protein sequences. I add multiple
SequencePanels (each having the same sequence) to a Container with a
BoxLayout. Each displays a different RangeLocation with the overall effect
that the sequence appears to wrap over many lines. The credit for this idea
goes to Mathew Pocock and it was working very nicely :-)
It breaks in 1.4pre1 however and the change that causes this is that the
SequencePanel's position within it's Container ( getX() and getY() ) is
added to the Graphics2D translation in the SequencePanel's paintComponent()
method. The SequencePanel is then painted in an unseen part of it's
Container.
i.e. from;
g2.translate(leadingBorder.getSize() - minAcross + insets.left, insets.top);
to;
g2.translate(leadingBorder.getSize() - minAcross + insets.left + getX(),
insets.top + getY());
I can imagine using a SequencePanel being used in a Container with a
BorderLayout or BoxLayout but I can't imagine it being arranged at a
coordinate other than (0,0). Can someone please explain the rationale for
the 1.4pre1 way of doing things or can we switch back to what 1.3 did?
Cheers,
Mark.
More information about the Biojava-l
mailing list