[Biojava-l] New FeatureRenderers and demo
Forsch, Dan
dorsch@netgenics.com
Wed, 13 Jun 2001 12:13:09 -0400
> -----Original Message-----
> From: David Huen [mailto:smh1008@cus.cam.ac.uk]
> Sent: Tuesday, June 12, 2001 4:02 PM
> To: Keith James
> Cc: BioJava List
> Subject: Re: [Biojava-l] New FeatureRenderers and demo
>
> On Tue, 12 Jun 2001, David Huen wrote:
>
> The horrible hack that does work now is to change the
> setgraphicsOrigin
> value of 50.0 to 0.00. This matches both visibleRect space
> and drawing
> space and so the mismatch doesn't show. I have tested this and it
> seems to obviate the problem. SequenceLister seems to work fine with
> it too. This hack will break when a border is set. I think
> this may have
> to be a temporary fix till I figure out a better fix.
>
> Would a better fix be to override the SequencePanel JComponent
> getVisibleRect() method to return a drawing space visibleRect? Are we
> agreeable to this?
I don't like that approach because getVisibleRect() is used by the Swing
internals. It should always return a value in the system coordinates.
I advocate going back to the problem(s) that resulted in the addition of the
setGraphicsOrigin method in the first place and trying to determine another
solution.
Barring that, rather than tweaking the coordinates in getVisibleRect(), how
about adding a SequencePanel specific method to do this?
Dan Forsch, Principal Software Engineer
NetGenics, Inc.
1717 East 9th Street, #1600
Cleveland, OH 44114
phone: 206.374.4541