Hi Bernhard - It is possible but it is not as easy as it should be (this is an area where we have considered a redesign).
Essentially most of the current graphics components of BioJava extend Swing components. The drawing of features etc is done by biojava code that draws into the Graphics2D objects of the component. This code is usually found in the paintComponent() method. What you can do it use exactly the same drawing code but use it to draw into the Graphics2D object of a java BufferedImage. You then use a java class called (I think) ImageIO to write it as JPG, PNG, TIFF etc. There is a nice project called Batik. This has objects that give you access to an implementation of a Graphics2D object. You 'draw' into that object in the normal java way and then the object converts everything you 'drew' into SVG which is useful in webpages or with SVG viewers. Ultimately biojava shouldn't really have swing components. What it should have is code that draws into Graphics2D objects which could be from Batik or Swing or a BufferedImage or something else entirely. This would provide much more flexible graphics system. - Mark On 5/7/07, Bernhard Heinzel <[EMAIL PROTECTED]> wrote: > Hi, > > I am a total newbie to BioJava... > Is it possible to generate Image Files(PNG,GIF,JPG) of Sequence Features? > > Thanks in Advance > Bernhard > _______________________________________________ > Biojava-l mailing list - [email protected] > http://lists.open-bio.org/mailman/listinfo/biojava-l > _______________________________________________ Biojava-l mailing list - [email protected] http://lists.open-bio.org/mailman/listinfo/biojava-l
