JAL-2796 first (ugly) start on changing Forester's MSA view to show seqs
authorkjvdheide <kjvanderheide@dundee.ac.uk>
Mon, 13 Nov 2017 14:47:57 +0000 (14:47 +0000)
committerkjvdheide <kjvanderheide@dundee.ac.uk>
Mon, 13 Nov 2017 14:49:31 +0000 (14:49 +0000)
forester/java/src/org/forester/archaeopteryx/phylogeny/data/RenderableMsaSequence.java

index 2f09ccf..aeec15b 100644 (file)
@@ -111,14 +111,16 @@ public final class RenderableMsaSequence implements RenderablePhylogenyData {
                         final boolean to_pdf ) {
         final float y = y1;
         final float start = x1 + 20;
-        final float width = _width / _seq.length;
+        final float width = (_width / _seq.length)*5;
+       g.setFont(g.getFont().deriveFont( width ));
         for( int i = 0; i < _seq.length; ++i ) {
             final char c = _seq[ i ];
             if ( width < 4 ) {
                 if ( c != '-' ) {
                     g.setColor( calculateColor( c ) );
                     _rectangle.setFrame( start + ( i * width ), y - 0.5, width + 1, getRenderingHeight() );
-                    g.fill( _rectangle );
+                    g.drawString( String.valueOf( c ), start + ( i * width ), y - 0.5f );
+                    //g.fill( _rectangle );
                 }
             }
             else {