[Biojava-l] Proposal for some changes in the SequencePanel class.

Kalle Näslund Kalle.Naslund@genpat.uu.se
Mon, 13 May 2002 19:27:15 +0200


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