// // METreeNodeRenderer.java // MetaEvolve // // Version 1 // // Created by Brian Risk of Geneffects on March 19, 2004. // Last Modified on March 19, 2004. // www.geneffects.com // import java.awt.*; public class METreeNodeRenderer implements TreeNodeRenderer{ //This implementation basis the shade of the node on the level //but you may employ any property of your node. public Color getNodeColor(Object node, int level) { Color out = Color.black; if (level <= 7) { int amt = (8 - level) * 32; if (amt >= 256) amt = 255; out = new Color(amt, amt, amt); } return out; } }