[Biojava-dev] GUI object manipulation

mark.schreiber at novartis.com mark.schreiber at novartis.com
Tue Nov 8 20:12:32 EST 2005


I agree that the MultilineRenderer would probably be the place to put a 
ticker. Alternatively you could make a ticker that draws itself on top of 
any component and have them all listen to the same event source so they 
all move at the same time.

GUI code seems to benefit greatly from extension and rewrites of the 
paintComponent(Graphics g) method. So your best bet would probably be 
extending MultilineRenderer and overiding the paintComponent(Graphics g) 
to do something like:

public void paintComponent(Graphics g){
      super.paintComponent(g); //paint the base stuff

      //code here to paint the ticker on top of the base stuff. 
}


- Mark





Russ Kepler <russ at kepler-eng.com>
Sent by: biojava-dev-bounces at portal.open-bio.org
11/09/2005 01:11 AM

 
        To:     biojava-dev at biojava.org
        cc:     (bcc: Mark Schreiber/GP/Novartis)
        Subject:        [Biojava-dev] GUI object manipulation


All,

I'm a recent user of the BioJava code, this in support of a project doing 
some 
specialized trace viewing/editing and sequence assembly.  I'm hoping to 
use 
the BioJava library in support for much of this and am still acquiring an 
understanding of the classes and their interfaces.

Since the project is going to have a lot of GUI I thought that I'd start 
by 
digging into the GUI code in org.biojava.bio.gui 

One thing I'm going to need is the ability to display a cursor on trace 
and 
sequence data.  This is fairly easily handled on an individual object 
basis 
but it's not uncommon to have a set of objects who all want to display the 

same cursor position (consider a trace with the symbols and a ruler 
underneath) so it seems that the MultiLineRenderer is a natural place for 
the 
collective code to go.

Before I dive in and muck things up does anyone have any suggestions? This 

area of the code is somewhat difficult and fairly unburdened with comments 

(plus I'd hate to introduce myself by screwing something up).

In the spirit of introducing myself: I'm a long time software developer 
(long 
time meaning I remember punching paper tape and cards) with quite a bit of 

experience in Java, having started using Java about 1.1.  I've lived 
mostly 
in the 'fat client' side of Java, starting with AWT and happily moving to 
Swing when it became available.  I've done bioinformatics for a little 
longer 
than Java, but a lot of the work was more in the vein of pushing bytes in 
databases and doing sample management (think LIMS)  than cool algorithm 
work. 

-- 
Russ Kepler
8600 La Sala del Centro
Albuquerque NM  87111

office: 505 296 4783
cell: 505 301 4796
_______________________________________________
biojava-dev mailing list
biojava-dev at biojava.org
http://biojava.org/mailman/listinfo/biojava-dev





More information about the biojava-dev mailing list