- if ( node.getNodeData().getSequence().getDomainArchitecture() instanceof RenderableDomainArchitecture ) {
- try {
- rds = ( RenderableDomainArchitecture ) node.getNodeData().getSequence().getDomainArchitecture();
- }
- catch ( final ClassCastException cce ) {
- cce.printStackTrace();
+ try {
+ rds = ( RenderableDomainArchitecture ) node.getNodeData().getSequence().getDomainArchitecture();
+ }
+ catch ( final ClassCastException cce ) {
+ cce.printStackTrace();
+ }
+ if ( rds != null ) {
+ final int default_height = 7;
+ float y = getYdistance();
+ if ( getControlPanel().isDynamicallyHideData() ) {
+ y = getTreeFontSet().getFontMetricsLarge().getHeight();
+ }
+ final int h = y < default_height ? ForesterUtil.roundToInt( y ) : default_height;
+ rds.setRenderingHeight( h > 1 ? h : 2 );
+ if ( getControlPanel().isDrawPhylogram() ) {
+ if ( getOptions().isLineUpRendarableNodeData() ) {
+ if ( getOptions().isRightLineUpDomains() ) {
+ rds.render( getMaxDistanceToRoot() * getXcorrectionFactor() + _length_of_longest_text
+ + ( _longest_domain - rds.getTotalLength() )
+ * rds.getRenderingFactorWidth(),
+ node.getYcoord() - ( h / 2 ),
+ g,
+ this,
+ to_pdf );
+ }
+ else {
+ rds.render( getMaxDistanceToRoot() * getXcorrectionFactor() + _length_of_longest_text,
+ node.getYcoord() - ( h / 2 ),
+ g,
+ this,
+ to_pdf );
+ }
+ }
+ else {
+ rds.render( node.getXcoord() + x, node.getYcoord() - ( h / 2 ), g, this, to_pdf );
+ }