Fuchs, Mathias wrote:

Hi everyone,

i am new to biojava and i am currently investigating suitable resources that
i could use for an upcomming project in the pharmaceutical industry. I made
some test implemantations with biojava and i think i will use it (or parts
of it).

I have played around with some renderers but could't find out if there is a
way to select (and highlight) a part of a sequence with the mouse and use
the selected part for further computing.
Is there a simple way to use mouse selecting of sequences or do i have to
write my own display for that purpose?

Thanks in advance to everyone

Mathias Fuchs



Elloh!

I dont think there is any existing classes that do what you want in biojava. But, i have hacked togheter
some code that does approximately what you describe.


Im doing this by using a LayeredRenderer that has two layers. The top layer holds the normal renderers
that do the actual sequence visualisation. The layer under has a renderer that renders a given location
in colored blocks. This gives the impression that you have marked some areas.


Then you just create some mouse listeners that listens for mouse events that are to be interpreted as
selection actions and sets the location to be rendered appropriately in the bottom layer.


Hacking this togheter shouldnt be that hard, on the other hand, if you trust my code ( its pretty hackish )
im willing to share it with you, either as GPL or LGPL licenced code.


kind regards Kalle Näslund

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

Reply via email to