[Biojava-l] Proposal for some changes in the SequencePanel cl
ass.
Cox, Greg
gcox@netgenics.com
Mon, 13 May 2002 14:49:44 -0400
Hello Kalle,
This would create some problems for us. Since alignments aren't sequences,
I'd rather see a seperate class, AlignmentPanel, than overload
SequencePanel. Off the cuff, I'd suggest pulling the common functions up to
a new class, AbstractPanel, and have both inherit from that. Is there a
reason this won't work that I'm missing?
I understand points 2 and 3, but I don't understand the use case driving
point 1. Could you recap the irc discussion for those who weren't there?
Regarding point 3, I'll observe that that EmblViewer doesn't call
getSequence() anywhere. I'm scanning our code to see if this would make our
stuff blow up, but I'd rather not see it happen regardless.
Greg
> -----Original Message-----
> From: Kalle Näslund [mailto:Kalle.Naslund@genpat.uu.se]
> Sent: Monday, May 13, 2002 1:27 PM
> To: biojava-l@biojava.org
> Subject: [Biojava-l] Proposal for some changes in the SequencePanel
> class.
>
>
> HI!
>
> I have a proposal for a change to the
> org.biojava.bio.gui.sequence.SequencePanel class. Currently the
> SequencePanel class only accepts objects of type Sequence. In some
> situations the need to visualize SymboLists arise, for
> example when you
> want to display alignments that are in the form of Alignment
> objects (
> that is what i want to do ).
> I have informaly spoken to some of the people on the biojava IRC (
> Internet Relay Chat ) channel and the response i got was that
> changing
> the SequencePanel class to accept SymbolLists would most
> likely be the
> prefered way to allow rendering of Alignment objects. I was also
> suggested that the current situation where the SequencePanel
> implements
> SequenceRenderContext should be changed, to a solution where the
> SequenceRenderContext is implemented by an inner class inside the
> SequencePanel class.
>
> To be a bit more precise, the changes would be the following:
>
> 1. Move all methods from SequenceRenderContext to an inner class
> 2. Make SequencePanel accept SymbolLists by chaning void setSequence(
> Sequence s );
> 3. Change of the method Sequence getSequence(); to return SymbolList
> instead, as one
> no longer can be sure that we are rendering a Sequence. ( i assume
> this can break things )
>
> I have a working SequencePanel class that have been changed
> according to
> the description. And the EmblViewer demo already included in Biojava
> works without any changes. This hopefully means that change
> no 3 isnt a
> severe change, but comments on this is very welcome.
>
> So, what do you think about these changes, are they
> acceptable, or will
> they break some major thing for people ?
>
> mvh Kalle Näslund
>
>
>
>
>
> _______________________________________________
> Biojava-l mailing list - Biojava-l@biojava.org
> http://biojava.org/mailman/listinfo/biojava-l
>