@Override public StringBuffer asText() { return new StringBuffer( getValue().toString() ); }
@Override public StringBuffer asSimpleText() { return new StringBuffer( getValue().toString() ); }
@Override public void toPhyloXML( final Writer writer, final int level, final String indentation ) throws IOException { writer.write( ForesterUtil.LINE_SEPARATOR ); writer.write( indentation ); PhylogenyDataUtil.appendOpen( writer, PhyloXmlMapping.COLOR ); PhylogenyDataUtil.appendElement( writer, PhyloXmlMapping.COLOR_RED, getValue().getRed() + "", indentation ); PhylogenyDataUtil.appendElement( writer, PhyloXmlMapping.COLOR_GREEN, getValue().getGreen() + "", indentation ); PhylogenyDataUtil.appendElement( writer, PhyloXmlMapping.COLOR_BLUE, getValue().getBlue() + "", indentation ); writer.write( ForesterUtil.LINE_SEPARATOR ); writer.write( indentation ); PhylogenyDataUtil.appendClose( writer, PhyloXmlMapping.COLOR ); }
@Override /** * Not a deep copy. * */ public PhylogenyData copy() { final BranchColor bc = new BranchColor(); bc.setValue( getValue() ); return bc; }
/** * * Convenience method * * @param node * @return */ public static Color getBranchColorValue( final PhylogenyNode node ) { if ( node.getBranchData().getBranchColor() == null ) { return null; } return node.getBranchData().getBranchColor().getValue(); }
final Color c = phylogeny_node.getBranchData().getBranchColor().getValue(); addSubelement( category, NODE_BRANCH_COLOR, c.getRed() + ", " + c.getGreen() + ", " + c.getBlue() );
++colorizations; if ( !ForesterUtil.isEmpty( n.getNodeData().getTaxonomy().getScientificName() ) ) { true_lineage_to_color_map.put( n.getNodeData().getTaxonomy().getScientificName(), c.getValue() ); TreePanelUtil.colorizeSubtree( node, c ); ++colorizations; true_lineage_to_color_map.put( lin, c.getValue() ); break; TreePanelUtil.colorizeSubtree( node, c ); ++colorizations; true_lineage_to_color_map.put( lin, c.getValue() ); break;