{
if (!groupList.isEmpty())
{
for (Entry<IHierarchyComponent, Integer> entry : groupList.entrySet())
{
IHierarchyComponent group = entry.getKey();
Integer c = entry.getValue();
//System.out.println("test color" + group+" "+c);
((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.BLACK);
switch (c)
{
case 0:
Color myWHITE = new Color(255, 255, 255, 5);
((BasicNodeComponentUI) group.getUI()).setBackgroundColor(myWHITE);
((BasicNodeComponentUI) group.getUI()).setBorderColor(myWHITE);
break;
case 1:
Color myYELLOW = new Color(255, 255, 0, 50);
((BasicNodeComponentUI) group.getUI()).setBackgroundColor(myYELLOW);
((BasicNodeComponentUI) group.getUI()).setBorderColor(Color.YELLOW);
//((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.YELLOW);
break;
case 2:
Color myCYAN = new Color(0, 255, 255, 50);
((BasicNodeComponentUI) group.getUI()).setBackgroundColor(myCYAN);
((BasicNodeComponentUI) group.getUI()).setBorderColor(Color.CYAN);
//((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.CYAN);
break;
case 3:
Color myMAGENTA = new Color(255, 0, 255, 50);
((BasicNodeComponentUI) group.getUI()).setBackgroundColor(myMAGENTA);
((BasicNodeComponentUI) group.getUI()).setBorderColor(Color.MAGENTA);
//((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.MAGENTA);
break;
case 4:
Color myBLUE = new Color(0, 0, 255, 50);
((BasicNodeComponentUI) group.getUI()).setBackgroundColor(myBLUE);
((BasicNodeComponentUI) group.getUI()).setBorderColor(Color.BLUE);
//((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.BLUE);
break;
case 8:
Color myLIGHT_GRAY = new Color(192, 192, 192, 50);
((BasicNodeComponentUI) group.getUI()).setBackgroundColor(myLIGHT_GRAY);
((BasicNodeComponentUI) group.getUI()).setBorderColor(Color.LIGHT_GRAY);
//((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.LIGHT_GRAY);
break;
case 6:
Color myORANGE = new Color(255, 102, 0, 50);
((BasicNodeComponentUI) group.getUI()).setBackgroundColor(myORANGE);
((BasicNodeComponentUI) group.getUI()).setBorderColor(Color.ORANGE);
//((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.ORANGE);
break;
case 7:
Color myRED = new Color(255, 0, 0, 50);
((BasicNodeComponentUI) group.getUI()).setBackgroundColor(myRED);
((BasicNodeComponentUI) group.getUI()).setBorderColor(Color.RED);
//((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.RED);
break;
case 5:
Color myGREEN = new Color(0, 255, 0, 50);
((BasicNodeComponentUI) group.getUI()).setBackgroundColor(myGREEN);
((BasicNodeComponentUI) group.getUI()).setBorderColor(Color.GREEN);
//((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.GREEN);
break;
case 9:
Color myPINK = new Color(255, 175, 175, 50);
((BasicNodeComponentUI) group.getUI()).setBackgroundColor(myPINK);
((BasicNodeComponentUI) group.getUI()).setBorderColor(Color.PINK);
//((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.PINK);
break;
case 10:
((BasicNodeComponentUI) group.getUI()).setBackgroundColor(Color.GRAY);
((BasicNodeComponentUI) group.getUI()).setBorderColor(Color.GRAY);
//((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.GRAY);
break;
default:
break;
}