+
+ //if ( getControlPanel().isShowMolSequences() && ( node.getNodeData().isHasSequence() )
+ // && ( node.getNodeData().getSequence().isMolecularSequenceAligned() )
+ // && ( !ForesterUtil.isEmpty( node.getNodeData().getSequence().getMolecularSequence() ) ) ) {
+ // paintMolecularSequences( g, node, to_pdf );
+ //}
+ }
+
+ private void paintMolecularSequences( final Graphics2D g, final PhylogenyNode node, final boolean to_pdf ) {
+ final RenderableMsaSequence rs = RenderableMsaSequence.createInstance( node.getNodeData().getSequence()
+ .getMolecularSequence(), node.getNodeData().getSequence().getType(), getConfiguration() );
+ if ( rs != null ) {
+ final int default_height = 8;
+ float y = getYdistance();
+
+ final int h = ( y / 2) < default_height ? ForesterUtil.roundToInt( y * 2 ) : default_height;
+ rs.setRenderingHeight( h > 1 ? h : 1 );
+
+ if ( getControlPanel().isDrawPhylogram() ) {
+ rs.render( ( float ) ( ( getMaxDistanceToRoot() * getXcorrectionFactor() ) + _length_of_longest_text ),
+ node.getYcoord() - ( h / 2.0f ),
+ g,
+ this,
+ to_pdf );
+ }
+ else {
+ rs.render( getPhylogeny().getFirstExternalNode().getXcoord() + _length_of_longest_text,
+ node.getYcoord() - ( h / 2.0f ),
+ g,
+ this,
+ to_pdf );
+ }
+ }
+ }
+
+ final private int calcLengthOfLongestText() {
+ final StringBuilder sb = new StringBuilder();
+ if ( _ext_node_with_longest_txt_info != null ) {
+ nodeDataAsSB( _ext_node_with_longest_txt_info, sb );
+ if ( _ext_node_with_longest_txt_info.getNodeData().isHasTaxonomy() ) {
+ nodeTaxonomyDataAsSB( _ext_node_with_longest_txt_info.getNodeData().getTaxonomy(), sb );
+ }
+ }
+ return getFontMetricsForLargeDefaultFont().stringWidth( sb.toString() );