void displayedPhylogenyMightHaveChanged( final boolean recalc_longest_ext_node_info ) {
if ( ( _mainpanel != null )
&& ( ( _mainpanel.getCurrentPhylogeny() != null ) && !_mainpanel.getCurrentPhylogeny().isEmpty() ) ) {
+
+ if ( recalc_longest_ext_node_info ) {
+ _mainpanel.getCurrentTreePanel().initNodeData();
+ _mainpanel.getCurrentTreePanel().calculateLongestExtNodeInfo();
+ }
if ( getOptions().isShowOverview() ) {
_mainpanel.getCurrentTreePanel().updateOvSizes();
}
_mainpanel.getCurrentTreePanel().calculateScaleDistance();
_mainpanel.getCurrentTreePanel().calcMaxDepth();
_mainpanel.adjustJScrollPane();
- if ( recalc_longest_ext_node_info ) {
- _mainpanel.getCurrentTreePanel().initNodeData();
- _mainpanel.getCurrentTreePanel().calculateLongestExtNodeInfo();
- }
+
_mainpanel.getCurrentTreePanel().repaint();
- // _mainpanel.getCurrentTreePanel().setUpUrtFactors();
+ // _mainpanel.getCurrentTreePanel().setUpUrtFactor();
}
}
fc.setFont( getMainPanel().getTreeFontSet().getLargeFont() );\r
fc.showDialog( this, "Select the Base Font" );\r
getMainPanel().getTreeFontSet().setBaseFont( fc.getFont() );\r
+ getControlPanel().displayedPhylogenyMightHaveChanged( true );\r
+ getMainPanel().getCurrentTreePanel().resetPreferredSize();\r
+ getMainPanel().getCurrentTreePanel().updateOvSizes();\r
+ \r
+ repaint();\r
}\r
\r
private void chooseMinimalConfidence() {\r
if ( e.isControlDown() ) {
if ( notches < 0 ) {
getTreeFontSet().increaseFontSize();
- getControlPanel().displayedPhylogenyMightHaveChanged( true );
}
else {
getTreeFontSet().decreaseFontSize( 1, false );
- getControlPanel().displayedPhylogenyMightHaveChanged( true );
}
+ getControlPanel().displayedPhylogenyMightHaveChanged( true );
+ resetPreferredSize();
+ updateOvSizes();
+ repaint();
}
else if ( e.isShiftDown() ) {
if ( ( getPhylogenyGraphicsType() == PHYLOGENY_GRAPHICS_TYPE.UNROOTED )
nodeTaxonomyDataAsSB( _ext_node_with_longest_txt_info.getNodeData().getTaxonomy(), sb );
}
}
+
return getFontMetricsForLargeDefaultFont().stringWidth( sb.toString() );
}
if ( ( _phylogeny == null ) || _phylogeny.isEmpty() ) {
return;
}
- int max_length = ForesterUtil.roundToInt( ( getSize().getWidth() - 2 * MOVE )
+ int max_possible_length = ForesterUtil.roundToInt( ( getSize().getWidth() - 2 * MOVE )
* AptxConstants.EXT_NODE_INFO_LENGTH_MAX_RATIO );
- if ( max_length < 40 ) {
- max_length = 40;
- }
+ if ( max_possible_length < 20 ) {
+ max_possible_length = 20;
+ }
int longest = 30;
int longest_txt = 0;
_longest_domain = 0;
// FIXME
sum += RenderableMsaSequence.DEFAULT_WIDTH + 30;
}
- if ( sum >= max_length ) {
- _longest_ext_node_info = max_length;
+ if ( sum >= max_possible_length ) {
+ _longest_ext_node_info = max_possible_length;
// return; //FIXME why?
}
if ( sum > longest ) {
}
}
_ext_node_with_longest_txt_info = longest_txt_node;
- if ( longest >= max_length ) {
- _longest_ext_node_info = max_length;
- }
- else {
- _longest_ext_node_info = longest;
- }
+ if ( longest >= max_possible_length ) {
+ _longest_ext_node_info = max_possible_length;
+ }
+ else {
+ _longest_ext_node_info = longest;
+ }
_length_of_longest_text = calcLengthOfLongestText();
}