[Biojava-l] how to do multi-lined feature display

Patrick McConnell MCCon012 at mc.duke.edu
Mon Mar 31 14:57:31 EST 2003


Using the imagemap infrastructure works really well.  Thanks!  It tooks
some time figuring out how to hook together all of the renderers, but I
attribute that to my lack of experience with BioJava.

I noticed that the ImapRenderer takes a URLFactory for mapping URLs to
hotspots.  URLs are somewhat too restrictive here because URL's do not
allow for relative links, internal links (via #), or javascript.  I think a
String is more suitable.  That being said, you can get around this simply
by constructing the URL when you print your image map out instead of during
image rendering.

I am having some problems spacing features out vertically with a
MultiLineRender.  My MultiLineRenderer draws directly to the
HeaderlessContext, and all of the feature blocks are bumping against each
other vertically.  How do I add some padding?

Thanks again!

-Patrick





Keith James <kdj at sanger.ac.uk>@biojava.org on 03/30/2003 04:57:16 PM

Sent by:    biojava-l-bounces at biojava.org


To:    "Patrick McConnell" <MCCon012 at mc.duke.edu>
cc:    "biojava-l at biojava.org" <biojava-l at biojava.org>

Subject:    Re: [Biojava-l] how to do multi-lined feature display


Sorry about the delay replying - one host I use here has been silently
dropping a lot of my outgoing mail. This is reply is regarding
imagemaps...

There is some imagemap infrastructure in the same package as the
SequenceRenderers which might be some use; see the ImageMap interface,
its ClientSide and ServerSide implementations, the HotSpot class
(which encapsulates coordinates, a URL and an optional user Object)
and the ImageMapRenderer interface.

ImageMapRenderer is a decorator for FeatureRenderer which provides a
method for creating suitable coord Strings. The current impls are a
bit sucky because I haven't had time to factor out the common parts of
the image-drawing and HotSpot-creating code. Right now there are
imagemap renderers for RectangularBeads and Ziggys, but it's a bit of
a pain creating new renderers.

Keith

--

- Keith James <kdj at sanger.ac.uk> bioinformatics programming support -
- Pathogen Sequencing Unit, The Wellcome Trust Sanger Institute, UK -

_______________________________________________
Biojava-l mailing list  -  Biojava-l at biojava.org
http://biojava.org/mailman/listinfo/biojava-l







More information about the Biojava-l mailing list