private final static int WIGGLE = 2;
private final static int LIMIT_FOR_HQ_RENDERING = 1000;
private final static int CONFIDENCE_LEFT_MARGIN = 4;
private final static int WIGGLE = 2;
private final static int LIMIT_FOR_HQ_RENDERING = 1000;
private final static int CONFIDENCE_LEFT_MARGIN = 4;
private final RenderingHints _rendering_hints = new RenderingHints( RenderingHints.KEY_RENDERING,
RenderingHints.VALUE_RENDER_DEFAULT );
private File _treefile = null;
private final RenderingHints _rendering_hints = new RenderingHints( RenderingHints.KEY_RENDERING,
RenderingHints.VALUE_RENDER_DEFAULT );
private File _treefile = null;
private PhylogenyNode[] _nodes_in_preorder = null;
private StringBuilder _current_external_nodes_data_buffer = new StringBuilder();
private int _current_external_nodes_data_buffer_change_counter = 0;
private PhylogenyNode[] _nodes_in_preorder = null;
private StringBuilder _current_external_nodes_data_buffer = new StringBuilder();
private int _current_external_nodes_data_buffer_change_counter = 0;
// private Image offscreenImage;
// private Graphics offscreenGraphics;
// private Dimension offscreenDimension;
// private Image offscreenImage;
// private Graphics offscreenGraphics;
// private Dimension offscreenDimension;
}
final PhylogenyNode node = findNode( e.getX(), e.getY() );
if ( ( node != null ) && ( node.isRoot() || !node.getParent().isCollapse() ) ) {
}
final PhylogenyNode node = findNode( e.getX(), e.getY() );
if ( ( node != null ) && ( node.isRoot() || !node.getParent().isCollapse() ) ) {
- // cursor is over a tree node
- if ( ( getControlPanel().getActionWhenNodeClicked() == NodeClickAction.CUT_SUBTREE )
+ if ( ( getControlPanel().getActionWhenNodeClicked() == NodeClickAction.GET_EXT_DESC_DATA ) ) {
+ for( final PhylogenyNode n : node.getAllExternalDescendants() ) {
+ addToCurrentExternalNodes( n.getId() );
+ }
+ setCursor( HAND_CURSOR );
+ repaint();
+ }
+ else if ( ( getControlPanel().getActionWhenNodeClicked() == NodeClickAction.CUT_SUBTREE )
|| ( getControlPanel().getActionWhenNodeClicked() == NodeClickAction.COPY_SUBTREE )
|| ( getControlPanel().getActionWhenNodeClicked() == NodeClickAction.PASTE_SUBTREE )
|| ( getControlPanel().getActionWhenNodeClicked() == NodeClickAction.DELETE_NODE_OR_SUBTREE )
|| ( getControlPanel().getActionWhenNodeClicked() == NodeClickAction.COPY_SUBTREE )
|| ( getControlPanel().getActionWhenNodeClicked() == NodeClickAction.PASTE_SUBTREE )
|| ( getControlPanel().getActionWhenNodeClicked() == NodeClickAction.DELETE_NODE_OR_SUBTREE )
root_x + ( Math.cos( angle ) * parent_radius ),
root_y + ( Math.sin( angle ) * parent_radius ),
g );
root_x + ( Math.cos( angle ) * parent_radius ),
root_y + ( Math.sin( angle ) * parent_radius ),
g );
- paintNodeBox( c.getXcoord(), c.getYcoord(), c, g, to_pdf, to_graphics_file, isInFoundNodes( c ) );
+ paintNodeBox( c.getXcoord(), c.getYcoord(), c, g, to_pdf, to_graphics_file, isInFoundNodes( c )
+ || isInCurrentExternalNodes( c ) );
if ( ( _dynamic_hiding_factor > 1 ) && !is_in_found_nodes
&& ( ( _urt_nodeid_index_map.get( c.getId() ) % _dynamic_hiding_factor ) != 1 ) ) {
return;
if ( ( _dynamic_hiding_factor > 1 ) && !is_in_found_nodes
&& ( ( _urt_nodeid_index_map.get( c.getId() ) % _dynamic_hiding_factor ) != 1 ) ) {
return;
root_x + ( Math.cos( angle ) * parent_radius ),
root_y + ( Math.sin( angle ) * parent_radius ),
g );
root_x + ( Math.cos( angle ) * parent_radius ),
root_y + ( Math.sin( angle ) * parent_radius ),
g );
g.setColor( getTreeColorSet().getFoundColor() );
drawRectFilled( c.getXSecondary() - 1, c.getYSecondary() - 1, 3, 3, g );
}
g.setColor( getTreeColorSet().getFoundColor() );
drawRectFilled( c.getXSecondary() - 1, c.getYSecondary() - 1, 3, 3, g );
}
void setCurrentExternalNodesDataBuffer( final StringBuilder sb ) {
increaseCurrentExternalNodesDataBufferChangeCounter();
_current_external_nodes_data_buffer = sb;
void setCurrentExternalNodesDataBuffer( final StringBuilder sb ) {
increaseCurrentExternalNodesDataBufferChangeCounter();
_current_external_nodes_data_buffer = sb;
final private void assignGraphicsForBranchWithColorForParentBranch( final PhylogenyNode node,
final boolean is_vertical,
final Graphics g,
final private void assignGraphicsForBranchWithColorForParentBranch( final PhylogenyNode node,
final boolean is_vertical,
final Graphics g,
final private boolean isInFoundNodes( final PhylogenyNode node ) {
return ( ( getFoundNodes() != null ) && getFoundNodes().contains( node.getId() ) );
}
final private boolean isInFoundNodes( final PhylogenyNode node ) {
return ( ( getFoundNodes() != null ) && getFoundNodes().contains( node.getId() ) );
}
- paintNodeBox( x2, y2, node, g, to_pdf, to_graphics_file, isInFoundNodes( node ) );
+ paintNodeBox( x2, y2, node, g, to_pdf, to_graphics_file, isInFoundNodes( node )
+ || isInCurrentExternalNodes( node ) );
g.setColor( getTreeColorSet().getFoundColor() );
drawRectFilled( node.getXSecondary() - 1, node.getYSecondary() - 1, 3, 3, g );
}
g.setColor( getTreeColorSet().getFoundColor() );
drawRectFilled( node.getXSecondary() - 1, node.getYSecondary() - 1, 3, 3, g );
}
final boolean dynamically_hide,
final int dynamic_hiding_factor,
final boolean to_graphics_file ) {
final boolean dynamically_hide,
final int dynamic_hiding_factor,
final boolean to_graphics_file ) {
if ( node.isCollapse() ) {
if ( ( !node.isRoot() && !node.getParent().isCollapse() ) || node.isRoot() ) {
paintCollapsedNode( g, node, to_graphics_file, to_pdf, is_in_found_nodes );
if ( node.isCollapse() ) {
if ( ( !node.isRoot() && !node.getParent().isCollapse() ) || node.isRoot() ) {
paintCollapsedNode( g, node, to_graphics_file, to_pdf, is_in_found_nodes );
- paintNodeBox( node.getXcoord(), node.getYcoord(), node, g, to_pdf, to_graphics_file, isInFoundNodes( node ) );
+ paintNodeBox( node.getXcoord(), node.getYcoord(), node, g, to_pdf, to_graphics_file, isInFoundNodes( node )
+ || isInCurrentExternalNodes( node ) );
_phylogeny
.getRoot()
.setXSecondary( ( float ) ( getVisibleRect().x + getOvXPosition() + ( MOVE / ( getVisibleRect().width / getOvRectangle()
.getWidth() ) ) ) );
_phylogeny.getRoot().setYSecondary( ( getVisibleRect().y + getOvYStart() ) );
_phylogeny
.getRoot()
.setXSecondary( ( float ) ( getVisibleRect().x + getOvXPosition() + ( MOVE / ( getVisibleRect().width / getOvRectangle()
.getWidth() ) ) ) );
_phylogeny.getRoot().setYSecondary( ( getVisibleRect().y + getOvYStart() ) );
for( final PhylogenyNode element : _nodes_in_preorder ) {
paintNodeLite( g, element );
}
for( final PhylogenyNode element : _nodes_in_preorder ) {
paintNodeLite( g, element );
}
current_angle += arc_size;
assignGraphicsForBranchWithColorForParentBranch( desc, false, g, to_pdf, to_graphics_file );
drawLine( x, y, new_x, new_y, g );
current_angle += arc_size;
assignGraphicsForBranchWithColorForParentBranch( desc, false, g, to_pdf, to_graphics_file );
drawLine( x, y, new_x, new_y, g );
- paintNodeBox( new_x, new_y, desc, g, to_pdf, to_graphics_file, isInFoundNodes( desc ) );
+ paintNodeBox( new_x, new_y, desc, g, to_pdf, to_graphics_file, isInFoundNodes( desc )
+ || isInCurrentExternalNodes( desc ) );
}
if ( n.isRoot() ) {
paintNodeBox( n.getXcoord(), n.getYcoord(), n, g, to_pdf, to_graphics_file, isInFoundNodes( n ) );
}
if ( n.isRoot() ) {
paintNodeBox( n.getXcoord(), n.getYcoord(), n, g, to_pdf, to_graphics_file, isInFoundNodes( n ) );
final float new_y = ( float ) ( y + ( Math.sin( mid_angle ) * length ) );
desc.setXSecondary( new_x );
desc.setYSecondary( new_y );
final float new_y = ( float ) ( y + ( Math.sin( mid_angle ) * length ) );
desc.setXSecondary( new_x );
desc.setYSecondary( new_y );
g.setColor( getTreeColorSet().getFoundColor() );
drawRectFilled( desc.getXSecondary() - 1, desc.getYSecondary() - 1, 3, 3, g );
g.setColor( getTreeColorSet().getOvColor() );
g.setColor( getTreeColorSet().getFoundColor() );
drawRectFilled( desc.getXSecondary() - 1, desc.getYSecondary() - 1, 3, 3, g );
g.setColor( getTreeColorSet().getOvColor() );