+ private void colorNodeFont( final PhylogenyNode node ) {
+ _color_chooser.setPreviewPanel( new JPanel() );
+ NodeColorizationActionListener al;
+ if ( ( getFoundNodes0() != null ) && !getFoundNodes0().isEmpty() ) {
+ final List<PhylogenyNode> additional_nodes = getFoundNodes0AsListOfPhylogenyNodes();
+ al = new NodeColorizationActionListener( _color_chooser, node, additional_nodes );
+ }
+ else {
+ al = new NodeColorizationActionListener( _color_chooser, node );
+ }
+ final JDialog dialog = JColorChooser
+ .createDialog( this, "Subtree colorization", true, _color_chooser, al, null );
+ dialog.setVisible( true );
+ }
+
+ private void changeNodeFont( final PhylogenyNode node ) {
+ final FontChooser fc = new FontChooser();
+ Font f = null;
+ if ( node.getNodeData().getNodeVisualData() != null && !node.getNodeData().getNodeVisualData().isEmpty() ) {
+ f = node.getNodeData().getNodeVisualData().getFontObject();
+ }
+ if ( f != null ) {
+ fc.setFont( f );
+ }
+ else {
+ fc.setFont( getMainPanel().getTreeFontSet().getLargeFont() );
+ }
+ fc.showDialog( this, "Select Font" );
+ if ( fc.getFont() != null ) {
+ NodeVisualData v = node.getNodeData().getNodeVisualData();
+ Font ff = fc.getFont();
+ v.setFont( ff.getFamily() );
+ v.setFontSize( ( byte ) ( ff.getSize() ) );
+ if ( ff.getStyle() == Font.BOLD && ff.getStyle() == Font.ITALIC ) {
+ v.setFontType( FontType.BOLD_ITALIC );
+ }
+ else if ( ff.getStyle() == Font.ITALIC ) {
+ v.setFontType( FontType.ITALIC );
+ }
+ else if ( ff.getStyle() == Font.BOLD ) {
+ v.setFontType( FontType.BOLD );
+ }
+ else {
+ v.setFontType( FontType.NORMAL );
+ }
+ }
+ }
+