sum += getFontMetricsForLargeDefaultFont().stringWidth( node.getNodeData().getBinaryCharacters()
.getGainedCharactersAsStringBuffer().toString() );
}
+
+ if ( getControlPanel().isShowVectorData() && node.getNodeData().getVector() != null && node.getNodeData().getVector().size() > 0 ) {
+ sum += RenderableVector.VECTOR_DEFAULT_WIDTH + 10;
+ }
+
if ( sum >= max_length ) {
setLongestExtNodeInfo( max_length );
return;
public final class RenderableVector implements RenderablePhylogenyData {
- final static public int DEFAULT_HEIGHT = 12;
- final static public int DEFAULT_WIDTH = 120;
+ final static int VECTOR_DEFAULT_HEIGHT = 12;
+ final static public int VECTOR_DEFAULT_WIDTH = 120;
private double _rendering_factor_width = 1.0;
private List<Double> _values;
private final Rectangle2D _rectangle = new Rectangle2D.Float();
final boolean to_pdf ) {
final double y = y1;
final double start = x1 + 20.0;
- final double width = ( double ) DEFAULT_WIDTH / _values.size();
+ final double width = ( double ) VECTOR_DEFAULT_WIDTH / _values.size();
for( int i = 0; i < _values.size(); ++i ) {
g.setColor( calculateColor( _values.get( i ) ) );
_rectangle.setFrame( start + ( i * width ), y - 0.5, width, getRenderingHeight() );
}
private Color calculateColor( final double v ) {
- return ForesterUtil.calcColor( v, _min, _max, _mean, Color.MAGENTA, Color.GREEN, Color.WHITE );
+ return ForesterUtil.calcColor( v, _min, _max, _mean, Color.BLUE, Color.RED, Color.WHITE );
}
private double getRenderingHeight() {
if ( _instance == null ) {
_instance = new RenderableVector();
}
- _instance.setRenderingHeight( DEFAULT_HEIGHT );
+ _instance.setRenderingHeight( VECTOR_DEFAULT_HEIGHT );
_instance._values = values;
_instance._configuration = configuration;
if ( stats.getN() > 0 ) {